How to Configure Firewalld in Linux CentOS 7 / RHEL7

Linux kernel includes powerful network filtering subsystem called Netfilter. It allows kernel modules to inspect each packet crossing the linux system such as to allow or drop incoming and outgoing network packet. In older Red Hat Enterprise Linux (RHEL) release such as RHEL 5 and RHEL 6, iptables was the main method of interacting with the kernel netfilter subsystem. The firewall capabilities were provided by the iptables utility, and configured either at the command line or through the graphical configuration tool, system-config-firewall.

In RHEL 7, firewalld has been introduced as a new method of interacting with netfilter. It is a default method for managing host-level firewalls. Basically the firewall capabilities are still provided by iptables. But linux administrators now interact with iptables through the dynamic firewall daemon, firewalld, and its configuration tools: firewall-config, firewall-cmd, and firewall-applet, which is not included in the default installation of Red Hat Enterprise Linux 7. Traffic management becomes easier after firewalld classifies all network traffic into a specific zone. Based on criteria such as source IP address of packets through the network, traffic was diverted into the firewall rules for approriate zone.

How to Configure Firewalld in Linux

There are three main ways for system administrators to interact with firewalld.

By directly editing congfiguration files in /etc/firewalld

By using the graphical firewall-config tool

By using firewalld-cmd from the command line (will be discussed in this article)

This article will discuss how to configure firewalld in linux CentoS 7, RHEL 7 and Oracle linux 7 by using firewalld-cmd command line. Please take note that the firewalld daemon is installed from the firewalld package. It is part of a base install, but not part of a minimal installation.

About The Author

The author of this blog is a part time blogger who is very enthusiastic about computer technology and Linux open source and has more than 8 years of experience in servicing, installing, configuring, administering Linux servers and VMware.