Loading...
Real Time Concepts

How to Install Firewalld Package on centos 7

Firewalld service not works in centos 6, It works only from centos 7 and higher versions

rpm -qa firewalld

sudo apt install firewalld

$ sudo systemctl start firewalld
$ sudo systemctl enable firewalld #enable the service to auto-start at boot time
$ sudo systemctl status firewalld #to know service status

You can also check whether the daemon is running or not, using the firewall-cmd tool as below

$ sudo firewall-cmd –state

If you want to do any changes permanently,You need to reload firewalld. This will reload firewall rules and their settings.

$ sudo firewall-cmd –reload

$ sudo firewall-cmd –zone=public –add-port=80/tcp –permanent
$ sudo firewall-cmd –reload

sudo firewall-cmd –zone=public –remove-port=443/tcp –permanent
$ sudo firewall-cmd –reload

To add service as permanent

$ firewall-cmd –permanent –add-service=https

Leave a Reply

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