FIREWALLD.POLICY-(5)
π FIREWALLD.POLICY-SET-GATEWAY(5) π
okay bestie, listen up β this is the manual page for firewalld.policy-set-gateway (manual section 5, so it's a config-format situation π
). It's the Firewalld Policy Set Gateway. Let's get into it fr fr.
β¨ NAME β¨
firewalld.policy-set-gateway β Firewalld Policy Set Gateway π¦
πΈ DESCRIPTION πΈ
π Policy Set: Gateway
The Gateway policy set is, like, the cutest little starting point for a home router. No cap. It turns on masquerading, conntrack helpers, and forwarding between zones. It's giving "I just set up my first router and I'm thriving".
The zones this set uses are logically grouped together, and those group names are what the predefined policies refer to. So like, when a policy says "LAN", it's not out here guessing β it means the specific crew below. π
+-----------+ +-----------+
| LAN | | WORLD |
|-----------| |-----------|
| zones: | | zones: |
| internal | | external |
| home | | public |
| trusted | | |
+-----------+ +-----------+
| |
| |
| +-----------+ |
+---------| HOST |--------+
|-----------|
| zones: |
+---------| HOST |--------+
| +-----------+ |
| |
| |
+-----------+ +-----------+
| WORK | | DMZ |
|-----------| |-----------|
| zones: | | zones: |
| work | | dmz |
+-----------+ +-----------+
π«Ά Policies in the Gateway set
okay here's the lineup, one by one, no skipping π
gateway-dmz-to-HOSTβ enables services that a gateway commonly needs, likednsanddhcp. β¨
File location: /usr/lib/firewalld/policies/gateway-dmz-to-HOST.xml
gateway-lan-to-workβ allows all traffic from LAN to work. It also enables masquerading and the common connection tracking helpers. π
File location: /usr/lib/firewalld/policies/gateway-lan-to-work.xml
gateway-lan-to-worldβ allows all traffic from LAN to world. And here's the tea π: if an interface is added to the"external"zone, then the traffic gets masqueraded. It also enables connection tracking helpers for common services, e.g.ftp.
File location: /usr/lib/firewalld/policies/gateway-lan-to-world.xml
gateway-lan-to-HOSTβ enables services that a gateway commonly needs, likednsanddhcp. πΈ
File location: /usr/lib/firewalld/policies/gateway-lan-to-HOST.xml
gateway-world-to-HOSTβ you can use this one to expose internal/dmz services to the world by adding a forward port to this policy. main character move, honestly π
Here's an example of adding a forward port. It forwards port 8080 to 10.1.1.42:80. π₯
# firewall-cmd --permanent --policy gateway-world-to-HOST \
--add-forward-port=port=8080:proto=tcp:toport=80:toaddr=10.1.1.42
# firewall-cmd --reload
File location: /usr/lib/firewalld/policies/gateway-world-to-HOST.xml
π¦ SEE ALSO π¦
go read your sisters, bestie, they're all iconic π
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 π
π AUTHORS π
shoutout to the devs, they ate and left no crumbs:
- Thomas Woerner
<twoerner@redhat.com>β Developer - Jiri Popelka
<jpopelka@redhat.com>β Developer - Eric Garver
<eric@garver.life>β Developer
that's the whole vibe check bestie, you're officially fluent in the Gateway policy set π§ stay safe out there and keep those zones grouped π
firewalld 2.5.2 β this page is from firewalld version 2.5.2, mwah, love that for us β
π¦ 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