FIREWALLD.CONF(5)
π FIREWALLD.CONF(5) π
okay bestie, so like β this is the manual for FIREWALLD.CONF(5), and no cap, it's lowkey the main character of your whole firewall setup. grab a snack π, we're doing this.
β¨ NAME β¨
firewalld.conf β the firewalld configuration file, aka the vibe-setting document for your firewall π
πΈ SYNOPSIS πΈ
/etc/firewalld/firewalld.conf
π¦ DESCRIPTION π¦
so firewalld.conf gets loaded by firewalld during the initialization process. it's the file where all the basic configuration options for firewalld live. that's it, that's the whole thing. your firewall reads it, it decides how it's gonna act, and you get to tell it what you want. it's giving "set the tone before the party starts" π
π OPTIONS π
these are the options you can set in the config file, one by one, no skipping, we're not that kind of friend:
DefaultZoneβ this sets the default zone for connections or interfaces when the zone isn't selected or specified by NetworkManager, initscripts, or a command line tool. the default zone ispublic. it's literally the fallback bestie when nobody spoke up β¨MinimalMarkβ deprecated. this option is ignored and no longer used. marks are no longer used internally. rest in peace, you're iconic but irrelevant now πCleanupModulesOnExitβ setting this toyesortrueunloads all firewall-related kernel modules when firewalld is stopped. the default value isnoorfalse.CleanupOnExitβ if firewalld stops, it cleans up all firewall rules. setting this option tonoorfalseleaves the current firewall rules untouched. the default value isyesortrue.IPv6_rpfilterβ performs reverse path filtering (RPF) on IPv6 packets as per RFC 3704. possible values:strict: performs "strict" filtering as per RFC 3704. this check verifies that the in ingress interface is the same interface that would be used to send a packet reply to the source. that is, ingress == egress.loose: performs "loose" filtering as per RFC 3704. this check only verifies that there is a route back to the source through any interface; even if it's not the same one on which the packet arrived.strict-forward: this is almost identical to "loose", but does not perform RPF for packets targeted to the host (INPUT).loose-forward: this is almost identical to "loose", but does not perform RPF for packets targeted to the host (INPUT).no: RPF is completely disabled.
the rp_filter for IPv4 is controlled using sysctl.
note: this feature has a performance impact. in most cases the impact is not enough to cause a noticeable difference. it requires route lookups and its execution occurs before the established connections fast path. as such it can have a significant performance impact if there is a lot of traffic. it's enabled by default for security π₯, but can be disabled if performance is a concern. alternatively one of the variants that only does RPF on forwarded packets may be used.
IndividualCallsβ if this option is disabled (it is by default), combined-restorecalls are used and not individual calls to apply changes to the firewall. the use of individual calls increases the time that is needed to apply changes and to start the daemon, but is good for debugging as error messages are more specific. slow but chatty, we love a details girlie πLogDeniedβ add logging rules right before reject and drop rules in theINPUT,FORWARDandOUTPUTchains for the default rules and also final reject and drop rules in zones for the configured link-layer packet type. the possible values are:all,unicast,broadcast,multicastandoff. the default setting isoff, which disables the logging.AutomaticHelpersβ deprecated. this option is ignored and no longer used. slay but retired πFirewallBackendβ selects the firewall backend implementation. possible values are;nftables(default), oriptables. this applies to all firewalld primitives. the only exception is direct and passthrough rules which always use the traditionaliptables,ip6tables, andebtablesbackends.
note: the iptables backend is deprecated. it will be removed in a future release.
FlushAllOnReloadβ flush all runtime rules on a reload. in previous releases some runtime configuration was retained during a reload, namely; interface to zone assignment, and direct rules. this was confusing to users. to get the old behavior set this to"no". defaults to"yes".ReloadPolicyβ the policy during reload. by default, all traffic except established connections is dropped while reloading the firewall rules. this can be overridden forINPUT,FORWARDandOUTPUT. the accepted values are"DROP","REJECT"and"ACCEPT", which then applies to all tables. alternatively, the policy can be specified per table, like"INPUT:REJECT,FORWARD:DROP,OUTPUT:ACCEPT". defaults to"INPUT:DROP,FORWARD:DROP,OUTPUT:DROP".RFC3964_IPv4β as per RFC 3964, filter IPv6 traffic with 6to4 destination addresses that correspond to IPv4 addresses that should not be routed over the public internet. defaults to"yes".StrictForwardPortsβ if set toyes, the generated destination NAT (DNAT) rules will NOT accept traffic that was DNAT'd by other entities, e.g. docker. firewalld will be strict and not allow published container ports until they're explicitly allowed via firewalld. if set tono, then docker (and podman) integrates seamlessly with firewalld. published container ports are implicitly allowed. defaults to"no".AllowZoneDriftingβ deprecated. this option is ignored and no longer used. another one we're pouring one out for πNftablesFlowtableβ this may improve forwarded traffic throughput by enabling nftables flowtable. it is a software fastpath and avoids calling nftables rule evaluation for data packets. its value is a space separate list of interfaces. example value"eth0 eth1". defaults to"off". zoom zoom π¦NftablesCountersβ if set toyes, add a counter to every nftables rule. this is useful for debugging and comes with a small performance cost. defaults to"no".NftablesTableOwnerβ if set toyes, the generated nftables rule set will be owned exclusively by firewalld. this prevents other entities from mistakenly (or maliciously) modifying firewalld's rule set. if you intentionally modify firewalld's rules, then you will have to set this to"no". defaults to"yes". protective queen behavior π
π SEE ALSO π
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)
the whole friend group, honestly π
π NOTES π
- firewalld home page:
π«Ά AUTHORS π«Ά
- 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, you ate π
this was firewalld 2.5.2 doing the absolute most, brought to you in the fine tradition of FIREWALLD.CONF(5). now go configure something iconic. periodt β¨π
π¦ 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