This simple example will open required TCP and UDP ports for uPnP traffic on a local LAN. I typically keep a firewall enabled on the local LAN nic even though it can become an ongoing nuisance.
First, make sure you have enabled the firewalld service. Next you can proceed by opening up some ports as illustrated below.
firewall-cmd --permanent --zone=public --add-port=1900/tcp
firewall-cmd --permanent --zone=public --add-port=1900/udp
firewall-cmd –reload as you may have guessed, loads the new configuration on the fly.