Here in this small post, I will discuss how to allow ports in the RHEL , CentOS or its derivatives like Alma Linux, Rocky Linux, Fedora, etc version firewall. some users want to open ports and some of user wants to open ports for services like HTTP, FTP, SSH, etc.

I am going to explain below for open port or add services in Firewalld.

First login with root user and find Active Zone in Firewalld.

You need to first search, which zone is active in Firewalld. To find get active zone, execute the below following command.

 # firewall-cmd --get-active-zones

In CentOS or RHEL , or the firewall is Firewalld, you will get a zone name The name can be dmz, public, or others. if you get an active zone is DMZ from the name and you want to open a port like 3444, then execute the below command to open the port in DMZ.

# firewall-cmd --zone=dmz  --permanent --add-port=3444/tcp 

if you want to change some other port then repeat the command and replace the port number, for each port you want to open . After that, we need to reload the service of the firewall to change the effect.

# firewall-cmd --reload
Firewall Open Port  , centos allow port firewall ,centos firewall-cmd open port , open port centos 7 firewalld

Most of the users want to use iptables instead of firewalld, so if you want to disable firewalls and implement iptable then you can refer this link of my blog post here.

By Sachin G

I am a professional freelance contributor and founder of tech transit. Love to write and lover of education, culture, and community. I have been using it, setting, supporting, and maintaining it since 2009.Linux rocks! Sachin G Follow me on LinkedIn and x formerly twitter