How to open port with firewalld Print

  • 5

Our Cloud PBX based on CentOS 7 that using systemd and firewalld. Here are some example to open ports:

To open standard PJSIP port:
firewall-cmd --zone=public --add-port=5060/udp --permanent
firewall-cmd --zone=public --add-port=5061/udp --permanent

To open standard Chan_SIP port:
firewall-cmd --zone=public --add-port=5160/udp --permanent
firewall-cmd --zone=public --add-port=5161/udp --permanent

To open standard media port:
firewall-cmd --zone=public --add-port=10000-20000/udp --permanent

To open standard IAX2 port:
firewall-cmd --zone=public --add-port=4569/udp --permanent

To open standard TCP port for both PJSIP and Chan_SIP:
firewall-cmd --zone=public --add-port=5160/tcp --permanent
firewall-cmd --zone=public --add-port=5060/tcp --permanent

Reload to update firewalld setting:
firewall-cmd --reload

To view updated setting:
firewall-cmd --list-all

 


Was this answer helpful?

« Back