Open ports with FirewallD on CentOS

Open ports with FirewallD on CentOS

If you are working with some services or ports that your application is using and if you are not receiving information from the server, probably it’s because your firewall is not running or doesn’t have the rules for the port you are using.

Here we are going to learn about how to open ports on CentOS using FirewallD.

  • Create a symlink so the service can start with the server systemctl enable firewalld
  • Initialize the firewallD systemctl start firewalld
  • Add a new port in permanent mode to your firewall firewall-cmd --permanent --add-port=100/tcp
  • Reload firewall-cmd --reload
  • Finally, check the new port added with firewall-cmd --list-ports
  • Enjoy!