Friday 6 December 2019

How to Install Firewalld on CentOS 7



Firewall is a network security tool that provide network level security based on a set of rules. It has controls on incoming and outgoing traffic.
This article describes How to Install Firewalld on CentOS7.

Step 1. Package Installation: Firewalld package are available in CentOS7 base repository and can be installed using yum command:

[root@linuxcnf ~]# yum install firewalld -y
Loaded plugins: fastestmirror
…………………
Installed:
  firewalld.noarch 0:0.6.3-2.el7_7.2

Dependency Installed:
…………………
  python-slip.noarch 0:0.4.0-4.el7      python-slip-dbus.noarch 0:0.4.0-4.el7

Updated:
  centos-release.x86_64 0:7-7.1908.0.el7.centos        dracut.x86_64 0:033-564.el7           
…………………
Dependency Updated:
  cryptsetup-libs.x86_64 0:2.0.3-5.el7                             device-mapper.x86_64 7:1.02.158-2.el7_7.2
…………………
  systemd-libs.x86_64 0:219-67.el7_7.2                          systemd-sysv.x86_64 0:219-67.el7_7.2

Complete!
[root@linuxcnf ~]#

Step 2. Start the Service: Run the flowing command to start firewalld service and enable to auto start on machine reboot:

[root@linuxcnf ~]# systemctl start firewalld
[root@linuxcnf ~]# systemctl enable firewalld
[root@linuxcnf ~]#

Step 3. Verify the Installation: Run the following command to verify the installation and service running status:

[root@linuxcnf ~]# firewall-cmd --version
0.6.3
[root@linuxcnf ~]#

[root@linuxcnf ~]# firewall-cmd --stat
running
[root@linuxcnf ~]#

[root@linuxcnf ~]# systemctl status firewalld
firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2019-12-06 10:29:59 UTC; 1min 18s ago
………………………….
[root@linuxcnf ~]#

[root@linuxcnf ~]# systemctl is-enabled firewalld
enabled
[root@linuxcnf ~]#

Done!!! Firewalld installed successfully and running fine.

No comments:

Post a Comment