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 is public. 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 to yes or true unloads all firewall-related kernel modules when firewalld is stopped. the default value is no or false.
  • CleanupOnExit β€” if firewalld stops, it cleans up all firewall rules. setting this option to no or false leaves the current firewall rules untouched. the default value is yes or true.
  • 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 -restore calls 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 the INPUT, FORWARD and OUTPUT chains 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, multicast and off. the default setting is off, 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), or iptables. this applies to all firewalld primitives. the only exception is direct and passthrough rules which always use the traditional iptables, ip6tables, and ebtables backends.
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 for INPUT, FORWARD and OUTPUT. 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 to yes, 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 to no, 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 to yes, 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 to yes, 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 πŸ“


🫢 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