What is Firewalld?

Who is using it?

Firewalld is used in the following Linux distributions as the default firewall management tool:

  • RHEL 7, CentOS 7
  • Fedora 18 and newer
  • Available for several other distributions

The most distinctive feature of Firewalld compared to IPTables is that it uses zones. Zone rules apply. Each zone can use different configurations. You can change all the rules that you apply by changing these zones.

Firewall-cmd is the most basic command we will use.

The following command displays the details of all configurations. Many details are available, such as whether it is active or not.

You can also use the command below to list all available zones.

You can also use the following commands to display the region used in the default (factory setting).


If the following command is used, you can change the default zone(Factory Outlet Zone).

NOTE 1: After creating rules in Firewalld, you must run the firewall-cmd –reload için command to take effect without restarting the machine.

The command below allows access to the service from outside.

NOTE 2: The permanent parameter makes the rule permanent.

Or existing rules can be deleted.

With the command below, port-based access permission can be granted, not service.

Or existing rules can be deleted.

There are also rich rules. As the name suggests, there are rules that can be created on a special, rope-based basis. This issue should also be addressed.

Only the rule that accepts all requests from IP is created.

Below, it rejects 22 requests from IP.

Rich rules can also be viewed with the following command.

Now all rules made so far can be viewed with the “firewall-cmd – list-all” command.

firewall-cmd –list-all
firewall-cmd –list-all