CrownCloud Wiki

CrownCloud - Internet Services

User Tools

Site Tools


Opening a port on CentOS 7

Usually firewalld is the default on all CentOS 7 machines but you can switch to iptables as well

If using firewalld:

  firewall-cmd --zone=public --add-port=PORT_HERE/tcp --permanent
  firewall-cmd --reload

If using iptables:

  iptables -A INPUT -p tcp -m tcp --dport PORT_HERE -j ACCEPT
  service iptables reload

Replace PORT_HERE with the port you wish to open.



  iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
  service iptables reload

Will open port 80 if using iptables


  firewall-cmd --zone=public --add-port=80/tcp --permanent
  firewall-cmd --reload

Will open port 80 if using firewall-cmd

opening_a_port_on_centos_7.txt · Last modified: 2015/07/05 09:41 by speedbus