FIREWALLD.ZONES(5)
β¨ firewalld.zones β the manual page, but make it a group chat β¨
okay bestie, welcome to firewalld.zones(5) π this is the zone lore. pull up a chair, get a snack, we're doing firewall vibes today π
πΈ NAME πΈ
firewalld.zones β firewalld zones. that's it. that's the name. iconic behavior honestly π
π¦ DESCRIPTION π¦
π« What is a zone? π«
okay so. a network zone is basically a trust level for network connections. and it's a one to many relation, which means: a connection can only be part of one zone, but a zone can be used for many network connections. one zone, many connections. she's popular. she's in demand. π
the zone defines the firewall features that are enabled in this zone:
- Intra Zone Forwarding β lets packets received by a zone be forwarded to other interfaces or sources within the same zone, even if the zone's target is not
ACCEPT. yes, even then. no cap. - Predefined services β a service is a combination of port and/or protocol entries. optionally, netfilter helper modules can be added, and also an IPv4 and IPv6 destination address. so, like, a little bundle. a service bundle. a curated set. β¨
- Ports and protocols β definition of
tcp,udp,sctpordccpports, where ports can be a single port or a port range. single or range, your call, bestie. - ICMP blocks β blocks selected Internet Control Message Protocol (ICMP) messages. these messages are either information requests or created as a reply to information requests or in error conditions. internet control message protocol. say it with me. π£
- ICMP block inversion β changes how ICMP messages are handled. when enabled, all ICMP message types are blocked, except for those in the ICMP block list. inversion! she flipped it! π
- Masquerading β the addresses of a private network are mapped to and hidden behind a public IP address. this is a form of address translation. she's hiding. she's mysterious. she's NAT-coded. π«₯
- Forward ports β a forward port is either mapped to the same port on another host, or to another port on the same host, or to another port on another host. three options. pick your fighter. π₯
- Rich language rules β the rich language extends the elements (
service,port,icmp-block,masquerade,forward-portandsource-port) with additional source and destination addresses, logging, actions and limits for logs and actions. it can also be used for host or network white and black listing. for more information, please have a look atfirewalld.richlanguage(5). she does it all. main character energy for real. π
for more information on the zone file format, please have a look at firewalld.zone(5) π
π Which zones are available? π
here are the zones provided by firewalld, sorted according to the default trust level of the zones from untrusted to trusted. we love a sorted list. we love a spectrum. from "stranger danger" to "you're basically family" π
dropβ any incoming network packets are dropped, there is no reply. only outgoing network connections are possible. she's not answering. she's not even reading your texts. πblockβ any incoming network connections are rejected with anicmp-host-prohibitedmessage for IPv4 andicmp6-adm-prohibitedfor IPv6. only network connections initiated within this system are possible. she will reply, but only to say "no". πpublicβ for use in public areas. you do not trust the other computers on networks to not harm your computer. only selected incoming connections are accepted. public wifi energy. stay safe out there. πexternalβ for use on external networks with masquerading enabled, especially for routers. you do not trust the other computers on networks to not harm your computer. only selected incoming connections are accepted. masquerading is on for this one, router besties πdmzβ for computers in your demilitarized zone that are publicly-accessible with limited access to your internal network. only selected incoming connections are accepted. demilitarized. dramatic. she's got boundaries. πworkβ for use in work areas. you mostly trust the other computers on networks to not harm your computer. only selected incoming connections are accepted. coworkers... mostly fine. mostly. π§homeβ for use in home areas. you mostly trust the other computers on networks to not harm your computer. only selected incoming connections are accepted. home sweet home π β¨internalβ for use on internal networks. you mostly trust the other computers on the networks to not harm your computer. only selected incoming connections are accepted. notice this one says "on the networks" plural, that's the original, i'm not editing her πtrustedβ all network connections are accepted. packets not addressed to this host will be forwarded. everyone's welcome. the door is open. the vibes are immaculate. π
πΈ Which zone should be used? πΈ
a public WIFI network connection, for example, should be mainly untrusted. a wired home network connection should be fairly trusted. select the zone that best matches the network you are using. vibe check your network. match the energy. that's the whole assignment fr fr β¨
π«Ά How to configure or add zones? π«Ά
to configure or add zones you can either use one of the firewalld interfaces to handle and change the configuration:
- the graphical configuration tool
firewall-config - the command line tool
firewall-cmd - or the D-Bus interface
or you can create or copy a zone file in one of the configuration directories. here's the tea:
/usr/lib/firewalld/zonesis used for default and fallback configurations/etc/firewalld/zonesis used for user created and customized configuration files
like, know the difference. it matters. iykyk π
π How to set or change a zone for a connection? π
the zone is stored into the ifcfg of the connection with the ZONE= option. if the option is missing or empty, the default zone set in firewalld is used.
if the connection is controlled by NetworkManager, you can also use nm-connection-editor to change the zone. cute little GUI moment π
for the addition or change of interfaces that are not under control of NetworkManager: firewalld tries to change the ZONE setting in the ifcfg file, if an ifcfg file exists that is using the interface.
only for the removal of interfaces that are not under control of NetworkManager: firewalld is not trying to change the ZONE setting in the ifcfg file. this is needed to make sure that an ifdown of the interface will not result in a reset of the zone setting to the default zone. only the zone binding is then removed in firewalld then.
π¨ okay hear me on this one because it's the sneaky bit: that "not changing the ZONE setting" thing on removal is on purpose. if it did change it, an ifdown would yeet your zone setting back to the default zone and you'd be like ??? so it doesn't. only the zone binding gets removed in firewalld. periodt. π―
π₯ SEE ALSO π₯
go read these too, bestie, they're all connected: firewall-applet(1), firewalld(1), firewall-cmd(1), firewall-config(1), firewalld.conf(5), firewalld.direct(5), firewalld.dbus(5), firewalld.icmptype(5), firewall-offline-cmd(1), firewalld.richlanguage(5), firewalld.service(5), firewalld.zone(5), firewalld.zones(5), firewalld.policy(5), firewalld.policies(5), firewalld.ipset(5), firewalld.helper(5)
β NOTES β
- firewalld home page:
http://firewalld.orgβ go say hi π
π AUTHORS π
the legends who made this happen, give them their flowers π
- Thomas Woerner
<twoerner@redhat.com>β Developer - Jiri Popelka
<jpopelka@redhat.com>β Developer - Eric Garver
<eric@garver.life>β Developer
and that's the whole page, bestie!! this was firewalld 2.5.2 and yes, the manual name really is FIREWALLD.ZONES(5) β thank you for coming to my ted talk, go configure your zones responsibly, mwah πβ¨ππ¦
π¦ where this page comes from
- arch rolling: firewalld 2.5.2-1 Β· GPL-2.0-or-later
- ubuntu stonking: firewalld 2.5.2-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms