how to add ports in linux firewall

How To Enable Firewall Rules and Port On Linux Server

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

By default, Firewall is enabled and you can use this command if you make some changes in the firewall. so

firewall-cmd –reload

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

Enable Firewall rules

Stop the firewall by

systemctl stop firewalld

disable firewall in linux

Stop the firewall by 

systemctl disable firewalld

This means the firewall is disabled which will be inactive mode and
won’t start at boot time.

Check Out: How To Enable Firewall In Window Using Command Line

Stop the firewall by 

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

Rate this article

Leave a Reply

avatar
  Subscribe  
Notify of