Now you'll learn how to configure the networking firewall using FirewallD. Starting with CentOS 7, FirewallD replaces iptables as the default firewall configuration utility (although iptables is still used behind the scenes by FirewallD). Based on which zones and services you configure, you can increase the network security of your server by controlling what traffic is allowed or disallowed to and from the system.
This recipe requires a CentOS system with a working network connection. You'll also need administrative privileges provided by logging in with the root
account.
This collection of commands will show you how to perform several basic configuration tasks using FirewallD's command-line client, firewall-cmd
:
To identify the currently active zones and which Ethernet devices are assigned to them, use the
--get-active-zones
flag:firewall-cmd --get-active-zones
To temporarily change which zone a device is assigned...