How to Check and Disable Firewall in Centos7/8, RHEL 7/8

How to Disable firewall in Linux

How to Check and Disable Firewall  in Centos7/8, RHEL 7/8   

As we know the firewall is very important for our system or server security. In some cases where you have an external firewall in your network or you are using a different firewall, you need to disable the firewall. Few sysadmins disable firewall for any application too but we recommend that for a case of application configure the firewall, do not disable. 
In this article, we will see how to check and disable the firewall in Linux.

Disable Firewall :

Step -1 Check firewall status with below command

#  systemctl status firewalld
systemctl status firewalld
This will show the current status of the firewall. Now it is on active showing.

Step -2 Disable the firewall with below command 

#  systemctl stop firewalld
This command stops firewall temporarily but if you reboot or reload it will be active again.

Step – 3 Permanent disable it with below command

#  systemctl disable firewalld
systemctl disable firewalld
This will disable the firewall permanently. After this, you can manually start firewall.

Step -4 Check firewall status with below command

#  systemctl status firewalld
systemctl status firewalld dead
Now you have successfully disabled the firewall of your Linux machine.
In case you want to Enable Firewall again. Follow the below procedure :

Enable Firewall 

Step -1 Start firewall with below command 

#  systemctl start firewalld
This will start firewall temporarily if it is disabled using disable command 

Step -2 Enable firewall permanently with below command 

 #  systemctl enable  firewalld
This will enable the firewall permanently.
At this point, you know how to disable and enable the firewall on RHEL 7/8  and Centos 7/8. Share this if it is helpful.

Leave a Comment

Your email address will not be published. Required fields are marked *