Forrest logo
back to the firewall-cmd tool

firewall-cmd:tldr:c347c

firewall-cmd: View the available firewall zones.
$ firewall-cmd --get-active-zones
try on your machine

The command firewall-cmd --get-active-zones is used to retrieve the currently active firewall zones on a system that is running firewalld. The "firewalld" is a dynamic firewall management tool used in many Linux distributions.

In firewalld, a firewall zone is a concept used to group network interfaces or sources into specific security zones. Each zone has its own set of rules defining how traffic should be handled, such as what services are allowed or blocked. Some commonly used zones are "public," "work," "home," and "dmz."

By running firewall-cmd --get-active-zones, the command will display the currently active zones on the system along with the interfaces assigned to each zone. This information helps you understand which zones are currently active and which interfaces are associated with them. It can be useful for troubleshooting network-related issues, verifying the firewall configuration, or ensuring that the appropriate zones are active and protecting the desired interfaces.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the firewall-cmd tool