Sometimes you want to know how to enable firewall rules just for testing purposes on the server. That’s not recommended to disable the firewall on the server but we can do it for testing purpose only. you can enable and disable the firewall, also check the status in Linux. so
How To Enable Firewall Rules and Port On Linux Server:
By default, Firewall is enabled and you can use this command if you make some changes in the firewall. so
Daemon is a UNIX or Linux type of program that runs in the background and performs a specified operation. so
Check Out: How To Add Ports in firewall On CentOS 7
In RedHat 7, firewall daemon command as firewalld-cmd and In RedHat 6, iptables used for the firewall. so
Check the status of the firewall by
systemctl status firewalld
Stop the firewall by
systemctl stop firewalld
we can disable the firewall using the below command.
systemctl disable firewalld
This means the firewall is disabled which will be inactive mode and
won’t start at boot time.
Enable the firewall using the below command.
systemctl enable firewalld
This means the firewall will start at boot time. Check pre-defined firewall rules by
ls -lrt /usr/lib/firewalld/zones/
That’s it. enable firewall in linux disable check status