FIREWALLD.DBUS(5)

🌸 NAME 🌸

firewalld.dbus β€” literally the firewalld D-Bus interface description, bestie πŸ’– this is the manual page FIREWALLD.DBUS(5) and she is long so buckle up πŸŽ€


πŸ—ΊοΈ OBJECT PATHS πŸ—ΊοΈ

okay so this is the basic firewalld object path structure, right? and the interfaces that get used at each path are explained down in the section called β€œINTERFACES” πŸ‘‡

/org/fedoraproject/FirewallD1
  Interfaces
    org.fedoraproject.FirewallD1
    org.fedoraproject.FirewallD1.direct (deprecated)
    org.fedoraproject.FirewallD1.ipset
    org.fedoraproject.FirewallD1.policies (deprecated)
    org.fedoraproject.FirewallD1.zone
    org.freedesktop.DBus.Introspectable
    org.freedesktop.DBus.Properties

/org/fedoraproject/FirewallD1/config
  Interfaces
    org.fedoraproject.FirewallD1.config
    org.fedoraproject.FirewallD1.config.direct (deprecated)
    org.fedoraproject.FirewallD1.config.policies (deprecated)
    org.freedesktop.DBus.Introspectable
    org.freedesktop.DBus.Properties

/org/fedoraproject/FirewallD1/config/zone/i
  Interfaces
    org.fedoraproject.FirewallD1.config.zone
    org.freedesktop.DBus.Introspectable
    org.freedesktop.DBus.Properties

/org/fedoraproject/FirewallD1/config/service/i
  Interfaces:
    org.fedoraproject.FirewallD1.config.service
    org.freedesktop.DBus.Introspectable
    org.freedesktop.DBus.Properties

/org/fedoraproject/FirewallD1/config/ipset/i
  Interfaces
    org.fedoraproject.FirewallD1.config.ipset
    org.freedesktop.DBus.Introspectable
    org.freedesktop.DBus.Properties

/org/fedoraproject/FirewallD1/config/icmptype/i
  Interfaces
    org.fedoraproject.FirewallD1.config.icmptype
    org.freedesktop.DBus.Introspectable
    org.freedesktop.DBus.Properties

πŸ”Œ INTERFACES πŸ”Œ

πŸ‘‘ org.fedoraproject.FirewallD1

this one is the main character honestly πŸ‘‘ she holds all the general runtime operations: reloading, panic mode, default zone stuff, grabbing services and icmp types and all their settings. like the whole vibe check of the running firewall.

⭐ Methods ⭐

  • authorizeAll() β†’ Nothing β€” starts up authorization for the complete firewalld D-Bus interface. bestie this one is mostly for configuration applications, iykyk 🫢
  • completeReload() β†’ Nothing β€” reloads the firewall completely, netfilter kernel modules and all πŸ’€ and yeah, this will most likely terminate your active connections because state information gets lost. so obviously only touch this if your firewall is having severe problems β€” like, for example, there are state information problems and literally no connection can be established even with correct firewall rules 😭
  • disablePanicMode() β†’ Nothing β€” turns panic mode off. after you disable it, connections that were already established might start working again β€” if panic mode was only on for a short period of time. no promises tho 🫠

possible errors: NOT_ENABLED, COMMAND_FAILED

  • resetToDefaults() β†’ Nothing β€” resets the firewall to its default configuration, then reloads the firewall. heads up: this hits both the runtime and the permanent configuration ✨
  • enablePanicMode() β†’ Nothing β€” turns panic mode on. every single incoming and outgoing packet gets dropped, and active connections will expire πŸ’€ only enable this if there are serious problems with your network environment, like genuinely serious.

possible errors: ALREADY_ENABLED, COMMAND_FAILED

  • getAutomaticHelpers() β†’ s β€” deprecated bestie, she always returns "no" πŸ™ˆ
  • getDefaultZone() β†’ s β€” returns the default zone. that's it, that's the method πŸ’…
  • getHelperSettings(s: helper) β†’ (sssssa(ss)) β€” returns the runtime settings of the given helper. if you want the permanent settings you gotta go look at org.fedoraproject.FirewallD1.config.helper.Methods.getSettings. the settings come in this format: version, name, description, family, module, and an array of ports.

possible errors: INVALID_HELPER

  • getHelpers() β†’ as β€” returns an array of helper names (s) in the runtime configuration. for the permanent configuration, go see org.fedoraproject.FirewallD1.config.Methods.listHelpers 🌈
  • getIcmpTypeSettings(s: icmptype) β†’ (sssas) β€” returns the runtime settings of the given icmptype. permanent settings live over at org.fedoraproject.FirewallD1.config.icmptype.Methods.getSettings. format is: version, name, description, and an array of destinations.

possible errors: INVALID_ICMPTYPE

  • getLogDenied() β†’ s β€” returns the LogDenied value. if LogDenied is enabled, then logging rules get added right before the reject and drop rules in the INPUT, FORWARD and OUTPUT chains for the default rules, and also final reject and drop rules in zones. possible values are: all, unicast, broadcast, multicast and off. the default value is off ⭐
  • getServiceSettings(s: service) β†’ (sssa(ss)asa{ss}asa(ss)) β€” deprecated! use org.fedoraproject.FirewallD1.Methods.getServiceSettings2 instead πŸ™ˆ
  • getServiceSettings2(s: service) β†’ s{sv} β€” returns the runtime settings of the given service. for the permanent settings see org.fedoraproject.FirewallD1.config.service.Methods.getSettings2. settings come as a dictionary indexed by keywords, and the type of each value is below. if a value is empty it may just be omitted, nbd πŸ’…

possible errors: INVALID_SERVICE

  • getZoneSettings(s: zone) β†’ (sssbsasa(ss)asba(ssss)asasasasa(ss)b) β€” deprecated! use org.fedoraproject.FirewallD1.zone.Methods.getZoneSettings2 instead πŸ™ˆ
  • listIcmpTypes() β†’ as β€” returns an array of names (s) of icmp types in the runtime configuration. for the permanent configuration see org.fedoraproject.FirewallD1.config.Methods.listIcmpTypes 🌈
  • listServices() β†’ as β€” returns an array of service names (s) in the runtime configuration. for permanent configuration see org.fedoraproject.FirewallD1.config.Methods.listServices ✨
  • queryPanicMode() β†’ b β€” returns true if panic mode is enabled, false otherwise. reminder: in panic mode all incoming and outgoing packets are dropped πŸ’€
  • reload() β†’ Nothing β€” reloads the firewall rules and keeps state information. the current permanent configuration becomes the new runtime configuration, which means every runtime-only change you made before the reload is gone with the reload β€” unless it was also in the permanent configuration 😭
  • runtimeToPermanent() β†’ Nothing β€” makes the runtime settings permanent. it replaces the permanent settings with the runtime settings for zones, policies, services, icmptypes, and direct (deprecated).

possible errors: RT_TO_PERM_FAILED

  • checkPermanentConfig() β†’ Nothing β€” runs checks on the permanent configuration. super useful if somebody changed configuration files manually πŸ‘€

possible errors: any

  • setDefaultZone(s: zone) β†’ Nothing β€” sets the default zone for connections and interfaces where no zone has been selected, to zone. setting the default zone changes the zone for the connections or interfaces that are using the default zone. and yeah, this is a runtime and permanent change, so it sticks πŸ’…

possible errors: ZONE_ALREADY_SET, COMMAND_FAILED

  • setLogDenied(s: value) β†’ Nothing β€” sets the LogDenied value to value. if LogDenied is enabled, then logging rules are added right before the reject and drop rules in the INPUT, FORWARD and OUTPUT chains for the default rules, and also final reject and drop rules in zones. possible values are: all, unicast, broadcast, multicast and off. the default value is off. this is a runtime and permanent change too πŸŽ€

possible errors: ALREADY_SET, INVALID_VALUE

πŸ¦‹ Signals πŸ¦‹

  • DefaultZoneChanged(s: zone) β€” emitted when the default zone has been changed to zone.
  • LogDeniedChanged(s: value) β€” emitted when the LogDenied value has been changed.
  • PanicModeDisabled() β€” emitted when panic mode has been deactivated.
  • PanicModeEnabled() β€” emitted when panic mode has been activated.
  • Reloaded() β€” emitted when firewalld has been reloaded. it also gets emitted for a complete reload, so yeah, she's consistent πŸ’–

🧚 Properties 🧚

  • BRIDGE - b - (ro) β€” indicates whether the firewall has ethernet bridge support.
  • IPSet - b - (ro) β€” indicates whether the firewall has IPSet support.
  • IPSetTypes - as - (ro) β€” the supported IPSet types by ipset and firewalld πŸ‘‘
  • IPv4 - b - (ro) β€” indicates whether the firewall has IPv4 support.
  • IPv4ICMPTypes - as - (ro) β€” the list of supported IPv4 ICMP types.

okay that's the main interface at the root path... and bestie we are so not done, there's a whole config side coming next 🌸

  • IPv6 β€” b β€” (ro) β€” tells you if the firewall can do IPv6 at all. yes/no energy ✨
  • IPv6_rpfilter β€” b β€” (ro) β€” is the reverse path filter test on an IPv6 packet turned on? if a reply to that packet would go out the same interface the packet came in on, the packet matches and gets accepted β€” otherwise, babes, it's dropped πŸ’€
  • IPv6ICMPTypes β€” as β€” (ro) β€” the list of IPv6 ICMP types that are supported πŸŽ€
  • nf_conntrach_helper_setting β€” b β€” (ro) β€” DEPRECATED. always False, it's giving legacy, don't get attached 🫢
  • nf_conntrack_helpers β€” a{sas} β€” (ro) β€” DEPRECATED. always hands you back an empty dictionary πŸ“­
  • nf_nat_helpers β€” a{sas} β€” (ro) β€” DEPRECATED. also always an empty dictionary, twins fr πŸ’…
  • interface_version β€” s β€” (ro) β€” the firewalld D-Bus interface version string πŸ”’
  • state β€” s β€” (ro) β€” where firewalld's at rn. can be INIT, FAILED, or RUNNING. in INIT it's starting up and initializing (main character getting ready ✨). in FAILED it fully started but hit a failure β€” not the vibe 😭
  • version β€” s β€” (ro) β€” the firewalld version string 🏷️

πŸ’– org.fedoraproject.FirewallD1.ipset πŸ’–

okay so the operations in this interface let you get, add, remove and query runtime ipset settings. want the permanent config instead? that's over at org.fedoraproject.FirewallD1.config.ipset bestie πŸ‘‘

✨ Methods ✨

  • addEntry(s: ipset, s: entry) β†’ as β€” adds a new entry to the ipset. the entry has to match the type of the ipset or it's not happening. if the ipset has the timeout option on, you literally can't see the entries because they're timing out automatically in the kernel, periodt. for the permanent version see org.fedoraproject.FirewallD1.config.ipset.Methods.addEntry.
Possible errors: INVALID_IPSET, IPSET_WITH_TIMEOUT
  • getEntries(s: ipset) β†’ Nothing β€” grab all the entries added to the ipset. heads up: if the ipset is using the timeout option you cannot see the entries β€” they're auto-timing-out in the kernel, soz πŸ™ˆ. return value is an array of entry. permanent version lives at org.fedoraproject.FirewallD1.config.ipset.Methods.getEntries.
Possible errors: INVALID_IPSET, IPSET_WITH_TIMEOUT
  • getIPSetSettings(s: ipset) β†’ (ssssa{ss}as) β€” returns the runtime settings of the given ipset. for the permanent ones see org.fedoraproject.FirewallD1.config.ipset.Methods.getSettings. settings come in this format: version, name, description, type, dictionary of options and array of entries πŸ“‹
Possible errors: INVALID_IPSET
  • getIPSets() β†’ as β€” returns an array of ipset names (s) in the runtime configuration. want the permanent config? go look at org.fedoraproject.FirewallD1.config.Methods.listIPSets 🌈
  • queryEntry(s: ipset, s: entry) β†’ b β€” tells you whether that entry has been added to the ipset or not. permanent operation is at org.fedoraproject.FirewallD1.config.ipset.Methods.queryEntry.
Possible errors: INVALID_IPSET
  • queryIPSet(s: ipset) β†’ b β€” tells you whether the ipset is even defined in the runtime configuration πŸ‘€
  • removeEntry(s: ipset, s: entry) β†’ as β€” yeets an entry out of the ipset. permanent version: org.fedoraproject.FirewallD1.config.ipset.Methods.removeEntry.
Possible errors: INVALID_IPSET, IPSET_WITH_TIMEOUT
  • setEntries(as: entries) β†’ Nothing β€” sets the list of entries to entries, permanently. permanent operation lives at org.fedoraproject.FirewallD1.config.ipset.Methods.setEntries. see the entry tag in firewalld.ipset(5) πŸ“

πŸ”” Signals πŸ””

  • EntryAdded(s: ipset, s: entry) β€” fires when an entry has been added to the ipset πŸŽ‰
  • EntryRemoved(s: ipset, s: entry) β€” fires when an entry has been removed from the ipset bye bestie πŸ‘‹

🚨 org.fedoraproject.FirewallD1.direct 🚨

DEPRECATED the direct interface is deprecated, no cap. it will be removed in a future release. it's superseded by policies, see firewalld.policies(5). don't build your whole personality on it πŸ’€

this interface gives you a way more direct line to the firewall. it lets you do runtime manipulation of chains and rules. for the permanent configuration see the org.fedoraproject.FirewallD1.config.direct interface πŸ”§

✨ Methods ✨

  • addChain(s: ipv, s: table, s: chain) β†’ Nothing β€” adds a new chain to table for ipv being either ipv4 (iptables) or ipv6 (ip6tables) or eb (ebtables). make sure there's no other chain with this name already, bestie. and yes, there are already basic chains you can use with the direct methods β€” INPUT_direct for example. these chains get jumped into before the chains for zones, so every rule you put into INPUT_direct gets checked before the rules in zones. for permanent operation see org.fedoraproject.FirewallD1.config.direct.Methods.addChain.
Possible errors: INVALID_IPV, INVALID_TABLE, ALREADY_ENABLED, COMMAND_FAILED
  • addPassthrough(s: ipv, as: args) β†’ Nothing β€” adds a tracked passthrough rule with the arguments args for ipv being either ipv4 (iptables) or ipv6 (ip6tables) or eb (ebtables). the only valid commands in args are -A/--append, -I/--insert and -N/--new-chain. this method is (unlike the passthrough method) tracked, meaning firewalld actually remembers it 🧠. it's useful with org.fedoraproject.FirewallD1.Methods.runtimeToPermanent. permanent operation: org.fedoraproject.FirewallD1.config.direct.Methods.addPassthrough.
Possible errors: INVALID_IPV, ALREADY_ENABLED, COMMAND_FAILED
  • addRule(s: ipv, s: table, s: chain, i: priority, as: args) β†’ Nothing β€” adds a rule with the arguments args to chain in table with priority for ipv being either ipv4 (iptables) or ipv6 (ip6tables) or eb (ebtables). the priority is what orders the rules: priority 0 means the rule goes on top of the chain, and the higher the priority the further down the rule lands ⬇️. rules with the same priority are on the same level and the order between them is not fixed and may change 😭. so if you need a rule to land after another one, use a low priority for the first and a higher one for the following. for permanent operation see org.fedoraproject.FirewallD1.config.direct.Methods.addRule.
Possible errors: INVALID_IPV, INVALID_TABLE, ALREADY_ENABLED, COMMAND_FAILED
  • getAllChains() β†’ a(sss) β€” gets all chains added to all tables, in the format: ipv, table, chain. this only concerns chains previously added with addChain. return value is an array of (ipv, table, chain). permanent operation is at org.fedoraproject.FirewallD1.config.direct.Methods.getAllChains 🧡
    • ipv (s): either ipv4 (iptables) or ipv6 (ip6tables) or eb (ebtables).
    • table (s): one of filter, mangle, nat, raw, security
    • chain (s): name of a chain.
  • getAllPassthroughs() β†’ a(sas) β€” gets all the tracked passthrough rules added in all ipv types, in the format: ipv, rule. only rules previously added with addPassthrough are in here. return value is an array of (ipv, array of arguments). permanent operation: org.fedoraproject.FirewallD1.config.direct.Methods.getAllPassthroughs πŸŽ€
    • ipv (s): either ipv4 (iptables) or ipv6 (ip6tables) or eb (ebtables).
    • arguments (as): array of commands, parameters and other iptables/ip6tables/ebtables command line options.
  • getAllRules() β†’ a(sssias) β€” gets all rules added to all chains in all tables, in the format: ipv, table, chain, priority, rule. this only concerns rules previously added with addRule. return value is an array of (ipv, table, chain, priority, array of arguments). permanent operation: org.fedoraproject.FirewallD1.config.direct.Methods.getAllRules πŸ”₯
    • ipv (s): either ipv4 (iptables) or ipv6 (ip6tables) or eb (ebtables).
    • table (s): one of filter, mangle, nat, raw, security
    • chain (s): name of a chain.
    • priority (i): used to order rules.
    • arguments (as): array of commands, parameters and other iptables/ip6tables/ebtables command line options.
  • getChains(s: ipv, s: table) β†’ as β€” returns an array of chain names (s) added to table for ipv being either ipv4 (iptables) or ipv6 (ip6tables) or eb (ebtables). only chains previously added with addChain count here. for permanent operation see org.fedoraproject.FirewallD1.config.direct.Methods.getChains ⛓️
Possible errors: INVALID_IPV, INVALID_TABLE
  • getPassthroughs(s: ipv) β†’ aas β€” gets the tracked passthrough rules added in either ipv4 (iptables) or ipv6 (ip6tables) or eb (ebtables). only rules previously added with addPassthrough show up. return value is an array of (array of arguments). permanent operation: org.fedoraproject.FirewallD1.config.direct.Methods.getPassthroughs 🫢
    • arguments (as): array of commands, parameters and other iptables/ip6tables/ebtables command line options.
  • getRules(s: ipv, s: table, s: chain) β†’ a(ias) β€” gets all rules added to chain in table for ipv being either ipv4 (iptables) or ipv6 (ip6tables) or eb (ebtables). only rules previously added with addRule are involved. return value is an array of (priority, array of arguments). for permanent operation see org.fedoraproject.FirewallD1.config.direct.Methods.getRules πŸ“œ
    • priority (i): used to order rules.
    • arguments (as): array of commands, parameters and other iptables/ip6tables/ebtables command line options.
Possible errors: INVALID_IPV, INVALID_TABLE
  • passthrough(s: ipv, as: args) β†’ s β€” bestie, this one just hands your command straight to the firewall. ipv is either ipv4 (iptables) or ipv6 (ip6tables) or eb (ebtables). And args can be all iptables, ip6tables and ebtables command line arguments. And yes, args can be all iptables, ip6tables and ebtables command line arguments β€” she said it twice, she meant it twice ✨ This command is untracked, which means firewalld is not able to provide information about this command later on. So like… she does it and then forgets it ever happened πŸ’€

Possible errors: COMMAND_FAILED

  • queryChain(s: ipv, s: table, s: chain) β†’ b β€” Returns whether a chain exists in table, where ipv is either ipv4 (iptables) or ipv6 (ip6tables) or eb (ebtables). This concerns only chains previously added with addChain. For permanent operation see org.fedoraproject.FirewallD1.config.direct.Methods.queryChain.

Possible errors: INVALID_IPV, INVALID_TABLE

  • queryPassthrough(s: ipv, as: args) β†’ b β€” Returns whether a tracked passthrough rule with the arguments args exists, for ipv being either ipv4 (iptables) or ipv6 (ip6tables) or eb (ebtables). This concerns only rules previously added with addPassthrough. For permanent operation see org.fedoraproject.FirewallD1.config.direct.Methods.queryPassthrough.

Possible errors: INVALID_IPV

  • queryRule(s: ipv, s: table, s: chain, i: priority, as: args) β†’ b β€” Returns whether a rule with priority and the arguments args exists in chain in table, for ipv being either ipv4 (iptables) or ipv6 (ip6tables) or eb (ebtables). This concerns only rules previously added with addRule. For permanent operation see org.fedoraproject.FirewallD1.config.direct.Methods.queryRule.

Possible errors: INVALID_IPV, INVALID_TABLE

  • removeAllPassthroughs() β†’ Nothing β€” Removes all passthrough rules previously added with addPassthrough. Like, every single one. Gone. Nothing returned, just vibes 🫢
  • removeChain(s: ipv, s: table, s: chain) β†’ Nothing β€” Removes a chain from table, for ipv being either ipv4 (iptables) or ipv6 (ip6tables) or eb (ebtables). Only chains previously added with addChain can be removed this way. For permanent operation see org.fedoraproject.FirewallD1.config.direct.Methods.removeChain.

Possible errors: INVALID_IPV, INVALID_TABLE, NOT_ENABLED, COMMAND_FAILED

  • removePassthrough(s: ipv, as: args) β†’ Nothing β€” Removes a tracked passthrough rule with arguments args, for ipv being either ipv4 (iptables) or ipv6 (ip6tables) or eb (ebtables). Only rules previously added with addPassthrough can be removed this way. For permanent operation see org.fedoraproject.FirewallD1.config.direct.Methods.removePassthrough.

Possible errors: INVALID_IPV, NOT_ENABLED, COMMAND_FAILED

  • removeRule(s: ipv, s: table, s: chain, i: priority, as: args) β†’ Nothing β€” Removes a rule with priority and arguments args from chain in table, for ipv being either ipv4 (iptables) or ipv6 (ip6tables) or eb (ebtables). Only rules previously added with addRule can be removed this way. For permanent operation see org.fedoraproject.FirewallD1.config.direct.Methods.removeRule.

Possible errors: INVALID_IPV, INVALID_TABLE, NOT_ENABLED, COMMAND_FAILED

  • removeRules(s: ipv, s: table, s: chain) β†’ Nothing β€” Removes all rules from chain in table, for ipv being either ipv4 (iptables) or ipv6 (ip6tables) or eb (ebtables). This concerns only rules previously added with addRule. For permanent operation see org.fedoraproject.FirewallD1.config.direct.Methods.removeRules.

Possible errors: INVALID_IPV, INVALID_TABLE


πŸ¦‹ Signals πŸ¦‹

the way she tells you everything that happens, she's such a good communicator πŸ’œ

  • ChainAdded(s: ipv, s: table, s: chain) β€” Emitted when chain has been added into table, for ipv being either ipv4 (iptables) or ipv6 (ip6tables) or eb (ebtables).
  • ChainRemoved(s: ipv, s: table, s: chain) β€” Emitted when chain has been removed from table, for ipv being either ipv4 (iptables) or ipv6 (ip6tables) or eb (ebtables).
  • PassthroughAdded(s: ipv, as: args) β€” Emitted when a tracked passthrough rule with args has been added, for ipv being either ipv4 (iptables) or ipv6 (ip6tables) or eb (ebtables).
  • PassthroughRemoved(s: ipv, as: args) β€” Emitted when a tracked passthrough rule with args has been removed, for ipv being either ipv4 (iptables) or ipv6 (ip6tables) or eb (ebtables).
  • RuleAdded(s: ipv, s: table, s: chain, i: priority, as: args) β€” Emitted when a rule with args has been added to chain in table with priority, for ipv being either ipv4 (iptables) or ipv6 (ip6tables) or eb (ebtables).
  • RuleRemoved(s: ipv, s: table, s: chain, i: priority, as: args) β€” Emitted when a rule with args has been removed from chain in table with priority, for ipv being either ipv4 (iptables) or ipv6 (ip6tables) or eb (ebtables).

🌈 org.fedoraproject.FirewallD1.zone 🌈

okay so this interface is where you get, add, remove and query the runtime zone's settings. Everything here is about the live, right-now state. For permanent settings see the org.fedoraproject.FirewallD1.config.zone interface β€” she keeps those two worlds very separate, periodt πŸ’…

Methods

  • getZoneSettings2(s: zone) β†’ a{sv} β€” Returns the runtime settings of the given zone. For getting permanent settings see org.fedoraproject.FirewallD1.config.zone.Methods.getSettings2. The settings come back as a dictionary indexed by keywords β€” for the type of each value, scroll down bestie. If a value is empty it may be omitted, so don't panic if something's just… not there πŸ™ˆ

Possible errors: INVALID_ZONE

  • setZoneSettings2(s: zone, a{sv}: settings, i: timeout) β€” Sets the runtime settings of the given zone. For setting permanent settings see org.fedoraproject.FirewallD1.config.zone.Methods.update2. settings is a dictionary indexed by keywords β€” types below, love. And to zero a value, pass an empty string or list (that's the trick, iykyk πŸ”₯).

Possible errors: INVALID_ZONE

  • addForwardPort(s: zone, s: port, s: protocol, s: toport, s: toaddr, i: timeout) β†’ s β€” Adds the IPv4 forward port into zone. If zone is empty, use the default zone (she's got you, don't worry πŸ₯Ί). The port can either be a single port number portid or a port range portid-portid. The protocol can either be tcp or udp. The destination address is a simple IP address. If timeout is non-zero, the operation will be active only for the amount of seconds β€” like a lil temporary slay ⏳ For permanent settings see org.fedoraproject.FirewallD1.config.zone.Methods.addForwardPort.

Returns name of zone to which the forward port was added.

Possible errors: INVALID_ZONE, INVALID_PORT, MISSING_PROTOCOL, INVALID_PROTOCOL, INVALID_ADDR, INVALID_FORWARD, ALREADY_ENABLED, INVALID_COMMAND

  • addIcmpBlock(s: zone, s: icmp, i: timeout) β†’ s β€” Adds an ICMP block icmp into zone. The icmp is the one of the icmp types firewalld supports. To get a listing of supported icmp types use org.fedoraproject.FirewallD1.Methods.listIcmpTypes 🌸 If zone is empty, use the default zone. If timeout is non-zero, the operation will be active only for the amount of seconds. For permanent settings see org.fedoraproject.FirewallD1.config.zone.Methods.addIcmpBlock.

Returns name of zone to which the ICMP block was added.

Possible errors: INVALID_ZONE, INVALID_ICMPTYPE, ALREADY_ENABLED, INVALID_COMMAND

  • addIcmpBlockInversion(s: zone) β†’ s β€” Adds ICMP block inversion to zone. If zone is empty, use the default zone. For permanent settings see org.fedoraproject.FirewallD1.config.zone.Methods.addIcmpBlockInversion.

Returns name of zone to which the ICMP block inversion was added.

Possible errors for that last one, since we got cut off mid-flow: INVALID_ZONE, ALREADY_ENABLED, INVALID_COMMAND. Carry on bestie πŸ’…


  • addInterface(s: zone, s: interface) β†’ s β€” okay so this is THE glow-up moment: you bind interface to zone, and from that point on literally all traffic going through that interface respects the zone's settings 🫢
    • If zone is empty, it uses the default zone.
    • Want it to survive a reboot? That's a permanent setting, go look at org.fedoraproject.FirewallD1.config.zone.Methods.addInterface.
    • Returns the name of the zone to which the interface was bound.
    • Possible errors: INVALID_ZONE, INVALID_INTERFACE, ALREADY_ENABLED, INVALID_COMMAND
  • addMasquerade(s: zone, i: timeout) β†’ s β€” turns masquerade ON in zone ✨. If zone is empty, default zone it is.
    • If timeout is non-zero, masquerading stays active for that many seconds ⏳.
    • Permanent vibes? See org.fedoraproject.FirewallD1.config.zone.Methods.addMasquerade.
    • Returns the name of the zone in which the masquerade was enabled.
    • Possible errors: INVALID_ZONE, ALREADY_ENABLED, INVALID_COMMAND
  • addPort(s: zone, s: port, s: protocol, i: timeout) β†’ s β€” drops a port into zone. Empty zone β†’ default zone, as always πŸ’–
    • port can be a single port number or a port range written like portid-portid.
    • protocol can be either tcp or udp.
    • If timeout is non-zero, the whole thing is only active for that many seconds.
    • For permanent settings see org.fedoraproject.FirewallD1.config.zone.Methods.addPort.
    • Returns the name of the zone to which the port was added.
    • Possible errors: INVALID_ZONE, INVALID_PORT, MISSING_PROTOCOL, INVALID_PROTOCOL, ALREADY_ENABLED, INVALID_COMMAND
  • addProtocol(s: zone, s: protocol, i: timeout) β†’ s β€” adds a protocol into zone. Empty zone β†’ default zone 🌸
    • protocol can be any protocol your system supports, so pls go peek at /etc/protocols for the supported ones πŸ‘€
    • If timeout is non-zero, the operation will be active only for the amount of seconds.
    • For permanent settings see org.fedoraproject.FirewallD1.config.zone.Methods.addProtocol.
    • Returns the name of the zone to which the protocol was added.
    • Possible errors: INVALID_ZONE, INVALID_PROTOCOL, ALREADY_ENABLED, INVALID_COMMAND
  • addRichRule(s: zone, s: rule, i: timeout) β†’ s β€” adds a rich language rule into zone πŸ‘‘
    • For the rich language rule syntax, please have a look at firewalld.direct(5).
    • If zone is empty, use default zone.
    • If timeout is non-zero, the operation will be active only for the amount of seconds.
    • For permanent settings see org.fedoraproject.FirewallD1.config.zone.Methods.addRichRule.
    • Returns the name of the zone to which the rich language rule was added.
    • Possible errors: INVALID_ZONE, INVALID_RULE, ALREADY_ENABLED, INVALID_COMMAND
  • addService(s: zone, s: service, i: timeout) β†’ s β€” adds a service into zone πŸ’œ
    • If zone is empty, use default zone.
    • If timeout is non-zero, the operation will be active only for the amount of seconds.
    • Wanna know which services even exist? Use org.fedoraproject.FirewallD1.Methods.listServices ⭐
    • For permanent settings see org.fedoraproject.FirewallD1.config.zone.Methods.addService.
    • Returns the name of the zone to which the service was added.
    • Possible errors: INVALID_ZONE, INVALID_SERVICE, ALREADY_ENABLED, INVALID_COMMAND
  • addSource(s: zone, s: source) β†’ s β€” binds a source to zone, so from now on all traffic going from that source respects the zone's settings πŸ¦‹
    • A source address or address range is either an IP address or a network IP address with a mask, for IPv4 or IPv6.
    • For IPv4, the mask can be a network mask or a plain number.
    • For IPv6, the mask is a plain number.
    • Use of host names is not supported, bestie, don't even try 🚫
    • If zone is empty, use default zone.
    • For permanent settings see org.fedoraproject.FirewallD1.config.zone.Methods.addSource.
    • Returns the name of the zone to which the source was bound.
    • Possible errors: INVALID_ZONE, INVALID_ADDR, ALREADY_ENABLED, INVALID_COMMAND
  • addSourcePort(s: zone, s: port, s: protocol, i: timeout) β†’ s β€” adds a source port into zone. Empty zone β†’ default zone.
    • port can be a single port number or a port range portid-portid.
    • protocol can be either tcp or udp.
    • If timeout is non-zero, the operation will be active only for the amount of seconds.
    • For permanent settings see org.fedoraproject.FirewallD1.config.zone.Methods.addSourcePort.
    • Returns the name of the zone to which the port was added.
    • Possible errors: INVALID_ZONE, INVALID_PORT, MISSING_PROTOCOL, INVALID_PROTOCOL, ALREADY_ENABLED, INVALID_COMMAND
  • changeZone(s: zone, s: interface) β†’ s β€” this one is deprecated 🫠 use org.fedoraproject.FirewallD1.zone.Methods.changeZoneOfInterface instead, fr fr.
  • changeZoneOfInterface(s: zone, s: interface) β†’ s β€” moves an interface over to zone. Like, it's basically removeInterface(interface) followed by addInterface(zone, interface), that's the whole tea β˜•
    • If interface has not been bound to a zone before, it behaves like addInterface.
    • If zone is empty, use default zone.
    • Returns the name of the zone to which the interface was bound.
    • Possible errors: INVALID_ZONE, ZONE_ALREADY_SET, ZONE_CONFLICT
  • changeZoneOfSource(s: zone, s: source) β†’ s β€” same energy, but for a source. It's basically removeSource(source) followed by addSource(zone, source) πŸ’«
    • If source has not been bound to a zone before, it behaves like addSource.
    • If zone is empty, use default zone.
    • Returns the name of the zone to which the source was bound.
    • Possible errors: INVALID_ZONE, ZONE_ALREADY_SET, ZONE_CONFLICT
  • getActiveZones() β†’ a{sa{sas}} β€” returns a dictionary of all currently active zones, together with the interfaces and sources used in those zones. "Active" means a zone that has a binding to an interface or a source, periodt πŸ’…
    • The return value is a dictionary where keys are zone names (s) and values are again dictionaries, where the keys are either 'interfaces' or 'sources' and the values are arrays of interface names (s) or sources (s).
  • getForwardPorts(s: zone) β†’ aas β€” returns the array of IPv4 forward ports previously added into zone. Empty zone β†’ default zone.
    • For getting permanent settings see org.fedoraproject.FirewallD1.config.zone.Methods.getForwardPorts.
    • Return value is an array of 4-tuples, where each 4-tuple consists of (port, protocol, to-port, to-addr). Note that to-addr might be empty in the case of local forwarding 🫑
    • Possible errors: INVALID_ZONE
  • getIcmpBlocks(s: zone) β†’ as β€” returns the array of ICMP type (s) blocks previously added into zone. Empty zone β†’ default zone.
    • For getting permanent settings see org.fedoraproject.FirewallD1.config.zone.Methods.getIcmpBlocks.
    • Possible errors: INVALID_ZONE
  • getIcmpBlockInversion(s: zone) β†’ b β€” returns whether ICMP block inversion was previously added to zone (yes/no, iconic boolean behaviour ✨). Empty zone β†’ default zone.
    • For getting permanent settings see org.fedoraproject.FirewallD1.config.zone.Methods.getIcmpBlockInversion.
    • Possible errors: INVALID_ZONE
  • getInterfaces(s: zone) β†’ as β€” returns the array of interfaces (s) previously bound with zone. Empty zone β†’ default zone.
    • For getting permanent settings see org.fedoraproject.FirewallD1.config.zone.Methods.getInterfaces.
    • Possible errors: INVALID_ZONE
  • getPorts(s: zone) β†’ aas β€” returns the array of ports (2-tuple of port and protocol) previously enabled in zone. Empty zone β†’ default zone.
    • For getting permanent settings see org.fedoraproject.FirewallD1.config.zone.Methods.getPorts.
    • Possible errors: INVALID_ZONE
  • getProtocols(s: zone) β†’ as β€” returns the array of protocols (s) previously enabled in zone. Empty zone β†’ default zone.
    • For getting permanent settings see org.fedoraproject.FirewallD1.config.zone.Methods.getProtocols.
    • Possible errors: INVALID_ZONE
  • getRichRules(s: zone) β†’ as β€” returns the array of rich language rules (s) previously added into zone. Empty zone β†’ default zone.
    • For getting permanent settings see org.fedoraproject.FirewallD1.config.zone.Methods.getRichRules.
    • Possible errors: INVALID_ZONE
  • getServices(s: zone) β†’ as β€” returns the array of services (s) previously enabled in zone. Empty zone β†’ default zone.
    • For getting permanent settings see org.fedoraproject.FirewallD1.config.zone.Methods.getServices.
    • Possible errors: INVALID_ZONE
  • getSourcePorts(s: zone) β†’ aas β€” returns the array of source ports (2-tuple of port and protocol) previously enabled in zone. Empty zone β†’ default zone.
    • For getting permanent settings see org.fedoraproject.FirewallD1.config.zone.Methods.getSourcePorts.
    • Possible errors: INVALID_ZONE
  • getSources(s: zone) β†’ as β€” returns the array of sources (s) previously bound with zone. Empty zone β†’ default zone.
    • For getting permanent settings see org.fedoraproject.FirewallD1.config.zone.Methods.getSources.
    • Possible errors: INVALID_ZONE
  • getZoneOfInterface(s: interface) β†’ s β€” returns the name (s) of the zone the interface is bound to, or an empty string.
  • getZoneOfSource(s: source) β†’ s β€” returns the name (s) of the zone the source is bound to, or an empty string.
  • getZones() β†’ as β€” returns the array of names (s) of predefined zones known to the current runtime environment 🌈
    • For the list of zones known to the permanent environment see org.fedoraproject.FirewallD1.config.Methods.listZones.
    • The two lists (zones known to runtime vs. permanent environment) will contain the same zones in most cases, but they might differ β€” for example if org.fedoraproject.FirewallD1.config.Methods.addZone has been called recently, but firewalld has not been reloaded since then πŸ‘€
  • isImmutable(s: zone) β†’ b β€” Deprecated. That's it, that's the whole description πŸ’€
  • queryForwardPort(s: zone, s: port, s: protocol, s: toport, s: toaddr) β†’ b β€” tells you whether the IPv4 forward port (port, protocol, toport, toaddr) is chillin' inside zone already. Leave zone empty and it just uses the default zone. Want the permanent version? That lives at org.fedoraproject.FirewallD1.config.zone.Methods.queryForwardPort πŸ’…
    • Possible errors: INVALID_ZONE, INVALID_PORT, MISSING_PROTOCOL, INVALID_PROTOCOL, INVALID_ADDR, INVALID_FORWARD
  • queryIcmpBlock(s: zone, s: icmp) β†’ b β€” returns whether an ICMP block for icmp has been added into zone. Empty zone = default zone, bestie. Permanent flavour: org.fedoraproject.FirewallD1.config.zone.Methods.queryIcmpBlock.
    • Possible errors: INVALID_ZONE, INVALID_ICMPTYPE
  • queryIcmpBlockInversion(s: zone) β†’ b β€” returns whether ICMP block inversion has been added to zone. No zone? default zone, obviously πŸŽ€ Permanent one: org.fedoraproject.FirewallD1.config.zone.Methods.queryIcmpBlockInversion.
    • Possible errors: INVALID_ZONE, INVALID_ICMPTYPE
  • queryInterface(s: zone, s: interface) β†’ b β€” asks whether interface has been bound to zone. Blank zone β†’ default zone. For the permanent version see org.fedoraproject.FirewallD1.config.zone.Methods.queryInterface.
    • Possible errors: INVALID_ZONE, INVALID_INTERFACE
  • queryMasquerade(s: zone) β†’ b β€” returns whether masquerading is turned on in zone. Empty zone means default zone. Permanent version: org.fedoraproject.FirewallD1.config.zone.Methods.queryMasquerade.
    • Possible errors: INVALID_ZONE
  • queryPort(s: zone, s: port, s: protocol) β†’ b β€” returns whether port/protocol has been added in zone. Leave zone empty, get the default zone. Permanent vibes at org.fedoraproject.FirewallD1.config.zone.Methods.queryPort.
    • Possible errors: INVALID_ZONE, INVALID_PORT, MISSING_PROTOCOL, INVALID_PROTOCOL
  • queryProtocol(s: zone, s: protocol) β†’ b β€” returns whether protocol has been added in zone. Empty zone = default zone. Permanent: org.fedoraproject.FirewallD1.config.zone.Methods.queryProtocol.
    • Possible errors: INVALID_ZONE, INVALID_PROTOCOL
  • queryRichRule(s: zone, s: rule) β†’ b β€” returns whether the rich rule rule has been added in zone. Empty zone β†’ default zone. Permanent operations: org.fedoraproject.FirewallD1.config.zone.Methods.queryRichRule.
    • Possible errors: INVALID_ZONE, INVALID_RULE
  • queryService(s: zone, s: service) β†’ b β€” returns whether service has been added for zone. Blank zone = default zone. Permanent: org.fedoraproject.FirewallD1.config.zone.Methods.queryService.
    • Possible errors: INVALID_ZONE, INVALID_SERVICE
  • querySource(s: zone, s: source) β†’ b β€” asks whether source has been bound to zone. Empty zone β†’ default zone. Permanent version: org.fedoraproject.FirewallD1.config.zone.Methods.querySource.
    • Possible errors: INVALID_ZONE, INVALID_ADDR
  • querySourcePort(s: zone, s: port, s: protocol) β†’ b β€” returns whether port/protocol has been added in zone. Empty zone = default zone. Permanent energy: org.fedoraproject.FirewallD1.config.zone.Methods.querySourcePort.
    • Possible errors: INVALID_ZONE, INVALID_PORT, MISSING_PROTOCOL, INVALID_PROTOCOL

okay now we're getting into the actual changing things era of this list and honestly? iconic πŸ™ˆ

  • removeForwardPort(s: zone, s: port, s: protocol, s: toport, s: toaddr) β†’ s β€” removes the IPv4 forward port (port, protocol, toport, toaddr) from zone. If zone is empty, it uses the default zone. Permanent version: org.fedoraproject.FirewallD1.config.zone.Methods.removeForwardPort.

Returns the name of the zone the forward port got removed from.

  • Possible errors: INVALID_ZONE, INVALID_PORT, MISSING_PROTOCOL, INVALID_PROTOCOL, INVALID_ADDR, INVALID_FORWARD, NOT_ENABLED, INVALID_COMMAND
  • removeIcmpBlock(s: zone, s: icmp) β†’ s β€” removes the ICMP block icmp from zone. Empty zone β†’ default zone. Permanent: org.fedoraproject.FirewallD1.config.zone.Methods.removeIcmpBlock.

Returns the name of the zone the ICMP block was removed from.

  • Possible errors: INVALID_ZONE, INVALID_ICMPTYPE, NOT_ENABLED, INVALID_COMMAND
  • removeIcmpBlockInversion(s: zone) β†’ s β€” removes ICMP block inversion from zone. If zone is empty, default zone it is. Permanent: org.fedoraproject.FirewallD1.config.zone.Methods.removeIcmpBlockInversion.

Returns the name of the zone where the ICMP block inversion got removed from.

  • Possible errors: INVALID_ZONE, NOT_ENABLED, INVALID_COMMAND
  • removeInterface(s: zone, s: interface) β†’ s β€” unbinds interface from zone. Heads up: if zone is empty, the interface gets removed from whatever zone it currently belongs to. Permanent version: org.fedoraproject.FirewallD1.config.zone.Methods.removeInterface.

Returns the name of the zone the interface was removed from.

  • Possible errors: INVALID_ZONE, INVALID_INTERFACE, NOT_ENABLED, INVALID_COMMAND
  • removeMasquerade(s: zone) β†’ s β€” disables masquerading for zone. Empty zone = default zone. Permanent: org.fedoraproject.FirewallD1.config.zone.Methods.removeMasquerade.

Returns the name of the zone the masquerade was disabled for.

  • Possible errors: INVALID_ZONE, NOT_ENABLED, INVALID_COMMAND
  • removePort(s: zone, s: port, s: protocol) β†’ s β€” yeets port/protocol out of zone. Empty zone β†’ default zone. Permanent: org.fedoraproject.FirewallD1.config.zone.Methods.removePort.

Returns the name of the zone the port was removed from.

  • Possible errors: INVALID_ZONE, INVALID_PORT, MISSING_PROTOCOL, INVALID_PROTOCOL, NOT_ENABLED, INVALID_COMMAND
  • removeProtocol(s: zone, s: protocol) β†’ s β€” removes protocol from zone. Blank zone, default zone. Permanent: org.fedoraproject.FirewallD1.config.zone.Methods.removeProtocol.

Returns the name of the zone the protocol was removed from.

  • Possible errors: INVALID_ZONE, INVALID_PROTOCOL, NOT_ENABLED, INVALID_COMMAND
  • removeRichRule(s: zone, s: rule) β†’ s β€” removes a rich language rule from zone. If zone is empty, default zone. Permanent: org.fedoraproject.FirewallD1.config.zone.Methods.removeRichRule.

Returns the name of the zone the rich language rule was removed from.

  • Possible errors: INVALID_ZONE, INVALID_RULE, NOT_ENABLED, INVALID_COMMAND
  • removeService(s: zone, s: service) β†’ s β€” removes service from zone. Empty zone = default zone. Permanent: org.fedoraproject.FirewallD1.config.zone.Methods.removeService.

Returns the name of the zone the service was removed from.

  • Possible errors: INVALID_ZONE, INVALID_SERVICE, NOT_ENABLED, INVALID_COMMAND
  • removeSource(s: zone, s: source) β†’ s β€” unbinds source from zone. Careful bestie: if zone is empty, the source gets removed from the zone it belongs to. Permanent version: org.fedoraproject.FirewallD1.config.zone.Methods.removeSource.

Returns the name of the zone the source was removed from.

  • Possible errors: INVALID_ZONE, INVALID_ADDR, NOT_ENABLED, INVALID_COMMAND
  • removeSourcePort(s: zone, s: port, s: protocol) β†’ s β€” removes port/protocol from zone. Empty zone β†’ default zone. Permanent: org.fedoraproject.FirewallD1.config.zone.Methods.removeSourcePort.

Returns the name of the zone the source port was removed from.

  • Possible errors: INVALID_ZONE, INVALID_PORT, MISSING_PROTOCOL, INVALID_PROTOCOL, NOT_ENABLED, INVALID_COMMAND

🌈 Signals 🌈

these are the little notifications firewalld yells into the void whenever something changes, and honestly? the group chat energy is unmatched πŸ’–
  • ForwardPortAdded(s: zone, s: port, s: protocol, s: toport, s: toaddr, i: timeout) β€” emitted when a forward port has been added to zone with timeout ✨
  • ForwardPortRemoved(s: zone, s: port, s: protocol, s: toport, s: toaddr) β€” emitted when a forward port has been removed from zone.
  • IcmpBlockAdded(s: zone, s: icmp, i: timeout) β€” emitted when an ICMP block for icmp has been added to zone with timeout.
  • IcmpBlockInversionAdded(s: zone) β€” emitted when ICMP block inversion has been added to zone.
  • IcmpBlockInversionRemoved(s: zone) β€” emitted when ICMP block inversion has been removed from zone.
  • IcmpBlockRemoved(s: zone, s: icmp) β€” emitted when an ICMP block for icmp has been removed from zone.
  • InterfaceAdded(s: zone, s: interface) β€” emitted when interface has been added to zone.
  • InterfaceRemoved(s: zone, s: interface) β€” emitted when interface has been removed from zone.
  • MasqueradeAdded(s: zone, i: timeout) β€” emitted when masquerade has been enabled for zone.
  • MasqueradeRemoved(s: zone) β€” emitted when masquerade has been disabled for zone.
  • PortAdded(s: zone, s: port, s: protocol, i: timeout) β€” emitted when port/protocol has been added to zone with timeout.
  • PortRemoved(s: zone, s: port, s: protocol) β€” emitted when port/protocol has been removed from zone.
  • ProtocolAdded(s: zone, s: protocol, i: timeout) β€” emitted when protocol has been added to zone with timeout.
  • ProtocolRemoved(s: zone, s: protocol) β€” emitted when protocol has been removed from zone.
  • RichRuleAdded(s: zone, s: rule, i: timeout) β€” emitted when a rich language rule has been added to zone with timeout.
  • RichRuleRemoved(s: zone, s: rule) β€” emitted when a rich language rule has been removed from zone.
  • ServiceAdded(s: zone, s: service, i: timeout) β€” emitted when service has been added to zone with timeout.
  • ServiceRemoved(s: zone, s: service) β€” emitted when service has been removed from zone.
  • SourceAdded(s: zone, s: source) β€” emitted when source has been added to zone.
  • SourcePortAdded(s: zone, s: port, s: protocol, i: timeout) β€” emitted when source-port/protocol has been added to zone with timeout.
  • SourcePortRemoved(s: zone, s: port, s: protocol) β€” fired the moment a source-port/protocol combo gets yeeted out of a zone. bye bestie πŸ’…
  • SourceRemoved(s: zone, s: source) β€” fired when a source gets removed from a zone. gone, no notes πŸ¦‹
  • ZoneChanged(s: zone, s: interface) β€” Deprecated πŸ‘΅ don't use her, she's retired
  • ZoneOfInterfaceChanged(s: zone, s: interface) β€” fired when the zone that an interface belongs to gets changed to zone. the glow-up is real ✨
  • ZoneOfSourceChanged(s: zone, s: source) β€” fired when the zone that a source belongs to gets changed to zone. same energy, different tag 🌸
  • ZoneUpdated2(s: zone, a{sv}: settings) β€” fired when a zone's settings get updated via org.fedoraproject.FirewallD1.zone.Methods.setZoneSettings2 πŸ”₯

πŸ’– org.fedoraproject.FirewallD1.policy πŸ’–

okay so this interface is your group chat for runtime policy settings β€” you can get them, add them, remove them, query them, all of it. Wanna touch the permanent side of things instead? That's a whole different bestie, go see the org.fedoraproject.FirewallD1.config.policy interface, iykyk πŸ’…

✨ Methods ✨

  • getActivePolicies() β†’ a{sa{sas}} β€” hands you a dictionary of all the currently active policies, plus the ingress zones and egress zones those policies are using. "Active" means the policy has a binding to an active ingress zone and an active egress zone β€” both, no half measures 🫢

The return value is a dictionary where the keys are policy names (s) and each value is another dictionary whose keys are either 'ingress_zones' or 'egress_zones', and those values are arrays of zone names (s). dictionary-inception, but make it fashion πŸŽ€

  • getPolicies() β†’ as β€” returns an array of names (s) of the predefined policies the current runtime environment knows about. Want the permanent-environment list instead? That's over in org.fedoraproject.FirewallD1.config.Methods.listPolicies. ngl these two lists will have the same policies in most cases, but they can differ β€” for example if org.fedoraproject.FirewallD1.config.Methods.addPolicy got called recently and firewalld hasn't been reloaded since then. runtime said yes, permanent hasn't caught up yet 😭
  • getPolicySettings(s: policy) β†’ a{sv} β€” returns the runtime settings of the given policy. For permanent settings go see org.fedoraproject.FirewallD1.config.policy.Methods.getSettings. The settings come as a dictionary indexed by keywords β€” for the possible keywords check out org.fedoraproject.FirewallD1.config.Methods.addPolicy. And heads up: if a value is empty, it may just be omitted entirely. she's mysterious like that πŸ™ˆ

Possible errors: INVALID_POLICY

  • setPolicySettings(s: policy, a{sv}: settings, i: timeout) β€” sets the runtime settings of the given policy. For setting permanent settings, go to org.fedoraproject.FirewallD1.config.policy.Methods.update. Settings are a dictionary indexed by keywords, and for the possible keywords see org.fedoraproject.FirewallD1.config.Methods.addPolicy. Wanna zero a value out? Pass an empty string or list, periodt πŸ’…

⚠️ some keywords are not up for modification at runtime: description, name, priority, target, version. they're off-limits, don't even try bestie πŸ’€

Possible errors: INVALID_POLICY

πŸ’« Signals πŸ’«

  • ForwardPortAdded(s: policy, a{sv}: settings) β€” fired when a policy's settings get updated via org.fedoraproject.FirewallD1.policy.Methods.setPolicySettings πŸ”₯

🌈 org.fedoraproject.FirewallD1.config 🌈

this one lets you permanently add, remove and query zones, services and icmp types. permanent permanent, like it's going in the yearbook πŸ“Έ

✨ Methods ✨

  • addIPSet(s: ipset, (ssssa{ss}as): settings) β†’ o β€” adds an ipset with the given settings into the permanent configuration. The settings land in this format: version, name, description, type, dictionary of options, and array of entries. let's break it down πŸ’–

Possible errors: NAME_CONFLICT, INVALID_NAME, INVALID_TYPE

  • addIcmpType(s: icmptype, (sssas): settings) β†’ o β€” adds an icmptype with the given settings into the permanent configuration. Settings come as: version, name, description, and an array of destinations. It returns the object path of the brand-new icmp type πŸ‘‘

Possible errors: NAME_CONFLICT, INVALID_NAME, INVALID_TYPE

  • addService(s: service, (sssa(ss)asa{ss}asa(ss)): settings) β†’ o β€” this function is deprecated πŸ™…β€β™€οΈ use org.fedoraproject.FirewallD1.config.Methods.addService2 instead. she's old news bestie
  • addService2s: service, a{sv}: settings) β†’ o β€” adds a service with the given settings into the permanent configuration. Settings are a dictionary indexed by keywords, and the type of each value is listed below. Wanna zero a value? Pass an empty string or list πŸ’…

Possible errors: NAME_CONFLICT, INVALID_NAME, INVALID_TYPE

  • addZone(s: zone, (sssbsasa(ss)asba(ssss)asasasasa(ss)b): settings) β†’ o β€” deprecated alert 🚨 use org.fedoraproject.FirewallD1.config.Methods.addZone2 instead
  • addZone2(s: zone, a{sv}: settings) β†’ o β€” adds a zone with the given settings into the permanent configuration. Settings are a dictionary indexed by keywords, types below. Zero a value by passing an empty string or list, easy πŸ’…

Possible errors: NAME_CONFLICT, INVALID_NAME, INVALID_TYPE

  • addPolicy(s: policy, a{sv}: settings) β†’ o β€” adds a policy with the given settings into the permanent configuration. Settings are a dictionary indexed by keywords, types listed below β€” and if you omit a keyword, the default value gets used. no stress, defaults have your back 🫢

Possible errors: NAME_CONFLICT, INVALID_NAME, INVALID_TYPE

  • getHelperByName(s: helper) β†’ o β€” returns the object path (permanent configuration, obvs) of the helper with the given name. go find your helper bestie πŸ’œ

Possible errors: INVALID_HELPER

  • getHelperNames() β†’ as β€” returns the list of helper names (permanent configuration). a whole roster of helpers, iconic πŸ‘‘
  • getIPSetByName(s: ipset) β†’ o β€” bestie, hand me an ipset name and I'll hand you back its object path in the permanent configuration. That's the on-disk version, not the live one, okay?
    • Possible errors: INVALID_IPSET
  • getIPSetNames() β†’ as β€” the full ✨list✨ of ipset names, straight from the permanent configuration.
  • getIcmpTypeByName(s: icmptype) β†’ o β€” give me an icmptype name, I give you its object path (permanent configuration). simple as that 🫢
    • Possible errors: INVALID_ICMPTYPE
  • getIcmpTypeNames() β†’ as β€” every icmptype name in the permanent configuration. all of them. no cap.
  • getServiceByName(s: service) β†’ o β€” service name in, object path (permanent configuration) out. πŸ’…
    • Possible errors: INVALID_SERVICE
  • getServiceNames() β†’ as β€” the whole lineup of service names (permanent configuration).
  • getZoneByName(s: zone) β†’ o β€” zone name in, object path (permanent configuration) out. iconic behavior.
    • Possible errors: INVALID_ZONE
  • getZoneNames() β†’ as β€” list of zone names (permanent configuration).
  • getZoneOfInterface(s: iface) β†’ s β€” tells you which zone the iface is bound to. If it isn't bound to anything? You get an empty string, which is the void, which is lowkey tragic. 😭
  • getZoneOfSource(s: source) β†’ s β€” same deal but for a source: the name of the zone it's bound to, or an empty string if it's out here unclaimed.
  • getPolicyByName(s: policy) β†’ o β€” policy name β†’ object path (permanent configuration). 🌸
    • Possible errors: INVALID_POLICY
  • getPolicyNames() β†’ as β€” list of policy names (permanent configuration). yes queen.
  • listHelpers() β†’ ao β€” returns an array of object paths (o) of every helper in the permanent configuration. Want the live/runtime ones instead? That's org.fedoraproject.FirewallD1.Methods.getHelpers, different girl entirely.
  • listIPSets() β†’ ao β€” array of object paths (o) of every ipset in permanent configuration. For the runtime lineup see org.fedoraproject.FirewallD1.ipset.Methods.getIPSets.
  • listIcmpTypes() β†’ ao β€” array of object paths (o) of the icmp types in permanent configuration. Runtime version lives at org.fedoraproject.FirewallD1.Methods.listIcmpTypes.
  • listServices() β†’ ao β€” array of object paths (o) of the services in permanent configuration. Runtime flex is org.fedoraproject.FirewallD1.Methods.listServices.
  • listZones() β†’ ao β€” object paths of every zone the permanent environment knows about. For the zones the runtime environment knows about, go see org.fedoraproject.FirewallD1.zone.Methods.getZones. And bestie, listen: those two lists are gonna match in most cases, but they can differ β€” like if org.fedoraproject.FirewallD1.config.Methods.addZone was called a minute ago and firewalld hasn't been reloaded since. Two different timelines fr fr. ⏳
  • listPolicies() β†’ ao β€” object paths of every policy in the permanent environment. Runtime list is over at org.fedoraproject.FirewallD1.policy.Methods.getPolicies. Again: usually identical, but they can drift β€” for example if org.fedoraproject.FirewallD1.config.Methods.addPolicy got called recently and firewalld hasn't been reloaded since then. πŸŒ€

Signals

  • HelperAdded(s: helper) β€” fired when a helper has been added. new helper just dropped πŸ’–
  • IPSetAdded(s: ipset) β€” fired when an ipset has been added. ✨
  • IcmpTypeAdded(s: icmptype) β€” fired when an icmptype has been added.
  • ServiceAdded(s: service) β€” fired when a service has been added. πŸŽ€
  • ZoneAdded(s: zone) β€” fired when a zone has been added. new zone, who dis πŸ‘‘

Properties

  • AllowZoneDrifting β€” s β€” (rw) β€” Deprecated. Reading it always gives you back "no". Writing to it? Ignored. It's giving ghost. πŸ’€
  • AutomaticHelpers β€” s β€” (rw) β€” Deprecated. Also always returns "no" when ya get it, and setting it gets ignored. periodt.
  • CleanupModulesOnExit β€” s β€” (rw) β€” set this to yes or true and firewalld unloads all the firewall-related kernel modules when it stops. clean exit energy ✨
  • CleanupOnExit β€” s β€” (rw) β€” when firewalld stops, it cleans up all firewall rules. Set it to no or false and it leaves whatever rules are currently sitting there totally untouched. choose your fighter.
  • DefaultZone β€” s β€” (ro) β€” the default zone for connections or interfaces when nobody picked one β€” not NetworkManager, not initscripts, not the command line tool. it's the fallback bestie 🫢
  • FirewallBackend β€” s β€” (rw) β€” picks the firewalld backend for all rules except the direct interface. Valid options are; nftables, iptables. Default is nftables.
Note: the iptables backend is deprecated. It will be removed in a future release. don't get attached 😭
  • FlushAllOnReload β€” s β€” (rw) β€” flush all runtime rules on a reload. Valid options are; yes, no. nice little reset button 🌈
  • IPv6_rpfilter β€” b β€” (rw) β€” Deprecated. Go look at org.fedoraproject.FirewallD1.config.Properties.IPv6_rpfilter2 instead, she's the replacement.
  • IPv6_rpfilter2 β€” s β€” (rw) β€” says whether the reverse path filter (RFE 3704) test on a packet for IPv6 is enabled. πŸ”₯
  • IndividualCalls β€” s β€” (ro) β€” tells you whether individual calls or combined -restore calls are being used. Turn it on and applying changes + starting the daemon takes longer, but it's great for debugging. trade-off queen.
  • LogDenied β€” s β€” (rw) β€” when LogDenied is enabled, logging rules get added right before the reject and drop rules in the INPUT, FORWARD and OUTPUT chains for the default rules, and also the final reject and drop rules in zones. Possible values are: all, unicast, broadcast, multicast and off. πŸ‘€
  • MinimalMark β€” i β€” (rw) β€” Deprecated. Ignored, no longer used. Marks aren't used internally anymore. rest in peace bestie πŸ’€
  • RFC3964_IPv4 β€” s β€” (rw) β€” per RFC 3964, filter IPv6 traffic with 6to4 destination addresses that correspond to IPv4 addresses that shouldn't be routed over the public internet. Valid options are; yes, no. 🌐
  • StrictForwardPorts β€” s β€” (rw) β€” set it to yes and the generated destination NAT (DNAT) rules will NOT accept traffic that was DNAT'd by other entities, e.g. docker. firewalld gets strict and won't allow published container ports until they're explicitly allowed via firewalld. Set it to no and docker (and podman) integrates seamlessly with firewalld β€” published container ports are implicitly allowed. pick your vibe πŸ’…
  • NftablesFlowtable β€” s β€” (rw) β€” this may improve forwarded traffic throughput by enabling the nftables flowtable. It's a software fastpath, so it skips calling nftables rule evaluation for data packets. Its value is a space separated list of interfaces. zoom zoom πŸ¦‹
  • NftablesCounters β€” s β€” (rw) β€” set it to yes and every nftables rule gets a counter. Super useful for debugging, comes with a small performance cost. worth it imo.
  • NftablesTableOwner β€” s β€” (rw) β€” set it to yes and the generated nftables rule set is owned exclusively by firewalld. That stops other entities from mistakenly (or maliciously) messing with firewalld's rule set. But heads up: if you intentionally modify firewalld's rules, you'll have to set this to "no". no cap.

🚫 org.fedoraproject.FirewallD1.config.direct 🚫

DEPRECATED

The direct interface has been deprecated. It will be removed in a future release. It is superseded by policies, see firewalld.policies(5). ok so this whole thing is on its way out, don't build your whole personality on it πŸ’€

Interface for permanent direct configuration, see also firewalld.direct(5). For runtime direct configuration see the org.fedoraproject.FirewallD1.direct interface.

Methods

  • addChain(s: ipv, s: table, s: chain) β†’ Nothing β€” add a new chain to table for ipv being either ipv4 (iptables) or ipv6 (ip6tables) or eb (ebtables). Make sure there's no other chain with this name already, bestie. There already exist basic chains to use with direct methods, for example the INPUT_direct chain. These chains are jumped into before chains for zones, i.e. every rule put into INPUT_direct gets checked before rules in zones. For runtime operation see org.fedoraproject.FirewallD1.direct.Methods.addChain.
    • Possible errors: INVALID_IPV, INVALID_TABLE, ALREADY_ENABLED
  • addPassthrough(s: ipv, as: args) β†’ Nothing β€” add a passthrough rule with the arguments args for ipv being either ipv4 (iptables) or ipv6 (ip6tables) or eb (ebtables). For runtime operation see org.fedoraproject.FirewallD1.direct.Methods.addPassthrough.
    • Possible errors: INVALID_IPV, ALREADY_ENABLED
  • addRule(s: ipv, s: table, s: chain, i: priority, as: args) β†’ Nothing β€” add a rule with the arguments args to chain in table with priority for ipv being either ipv4 (iptables) or ipv6 (ip6tables) or eb (ebtables). The priority orders the rules. Priority 0 means add the rule on top of the chain; with a higher priority the rule gets added further down. Rules with the same priority sit on the same level, and the order of those is not fixed and may change. So if you want to make absolutely sure a rule lands after another one, use a low priority for the first and a higher one for the following. For runtime operation see org.fedoraproject.FirewallD1.direct.Methods.addRule. ✨
    • Possible errors: INVALID_IPV, INVALID_TABLE, ALREADY_ENABLED
  • getAllChains() β†’ a(sss) β€” get all chains added to all tables, in the format: ipv, table, chain. This only concerns chains previously added with addChain. Return value is an array of (ipv, table, chain). For runtime operation see org.fedoraproject.FirewallD1.direct.Methods.getAllChains.
    • ipv (s): either ipv4 (iptables) or ipv6 (ip6tables) or eb (ebtables).
    • table (s): one of filter, mangle, nat, raw, security
    • chain (s): name of a chain.
  • getAllPassthroughs() β†’ a(sas) β€” get all passthrough rules added in all ipv types, in the format: ipv, rule. This only concerns rules previously added with addPassthrough. Return value is an array of (ipv, array of arguments). For runtime operation see org.fedoraproject.FirewallD1.direct.Methods.getAllPassthroughs. 🫢
    • ipv (s): either ipv4 (iptables) or ipv6 (ip6tables) or eb (ebtables).
  • arguments (as) β€” an array of commands, parameters, and alllll the other iptables/ip6tables/ebtables command line options. that's the whole rule, babes πŸ’–

getChains(s: ipv, s: table) β†’ as

okay so this one hands you back an array of chains (s) that were added to table for ipv, where ipv is either ipv4 (that's iptables), ipv6 (that's ip6tables), or eb (that's ebtables). πŸ¦‹ heads up tho β€” this only covers chains you already added with addChain. nothing else, no sneaky extras. want the runtime version instead? go look at org.fedoraproject.FirewallD1.direct.Methods.getChains.

  • Possible errors: INVALID_IPV, INVALID_TABLE

getPassthroughs(s: ipv) β†’ aas

Get the tracked passthrough rules that were added in either ipv4 (iptables), ipv6 (ip6tables), or eb (ebtables). again bestie, this is only the stuff you previously added with addPassthrough, nothing more. the return value is an array of (array of arguments). for the runtime behaviour see org.fedoraproject.FirewallD1.direct.Methods.getPassthroughs.

  • arguments (as) β€” an array of commands, parameters, and other iptables/ip6tables/ebtables command line options ✨

getRules(s: ipv, s: table, s: chain) β†’ a(ias)

This one grabs all the rules added to chain in table for ipv being either ipv4 (iptables), ipv6 (ip6tables), or eb (ebtables). and yeah, you guessed it β€” only rules previously added with addRule count here. the return value is an array of (priority, array of arguments). runtime operation lives over at org.fedoraproject.FirewallD1.direct.Methods.getRules.

  • priority (i) β€” used to order rules 🌸
  • arguments (as) β€” an array of commands, parameters and other iptables/ip6tables/ebtables command line options.
  • Possible errors: INVALID_IPV, INVALID_TABLE

getSettings() β†’ (a(sss)a(sssias)a(sas))

Get the settings of your permanent direct configuration, in the format: array of chains, array of rules, array of passthroughs. so like, the full trio πŸ’…

  • chains (a(sss)) β€” array of (ipv, table, chain), see 'chain' in firewalld.direct(5).
  • rules (a(sssias)) β€” array of (ipv, table, chain, priority, array of arguments), see 'rule' in firewalld.direct(5).
  • passthroughs (a(sas)) β€” array of (ipv, array of arguments), see passthrough in firewalld.direct(5).

queryChain(s: ipv, s: table, s: chain) β†’ b

Returns whether a chain exists in table for ipv being either ipv4 (iptables), ipv6 (ip6tables), or eb (ebtables). one (1) caveat bestie: this only concerns chains previously added with addChain. want the runtime flavour? org.fedoraproject.FirewallD1.direct.Methods.queryChain. 🫢

  • Possible errors: INVALID_IPV, INVALID_TABLE

queryPassthrough(s: ipv, as: args) β†’ b

Returns whether a tracked passthrough rule with the arguments args exists for ipv being either ipv4 (iptables), ipv6 (ip6tables), or eb (ebtables). and no cap, this only concerns rules previously added with addPassthrough. runtime operation: org.fedoraproject.FirewallD1.direct.Methods.queryPassthrough.

  • Possible errors: INVALID_IPV

queryRule(s: ipv, s: table, s: chain, i: priority, as: args) β†’ b

Returns whether a rule with priority and the arguments args exists in chain in table for ipv being either ipv4 (iptables), ipv6 (ip6tables), or eb (ebtables). only rules previously added with addRule are in scope here, obviously. runtime operation: org.fedoraproject.FirewallD1.direct.Methods.queryRule.

  • Possible errors: INVALID_IPV, INVALID_TABLE

removeChain(s: ipv, s: table, s: chain) β†’ Nothing

Removes a chain from table for ipv being either ipv4 (iptables), ipv6 (ip6tables), or eb (ebtables). important, bestie: only chains previously added with addChain can be removed this way. runtime operation: org.fedoraproject.FirewallD1.direct.Methods.removeChain.

  • Possible errors: INVALID_IPV, INVALID_TABLE, NOT_ENABLED

removePassthrough(s: ipv, as: args) β†’ Nothing

Removes a passthrough rule with arguments args for ipv being either ipv4 (iptables), ipv6 (ip6tables), or eb (ebtables). only rules previously added with addPassthrough can be removed this way, periodt. runtime operation: org.fedoraproject.FirewallD1.direct.Methods.removePassthrough.

  • Possible errors: INVALID_IPV, NOT_ENABLED

removeRule(s: ipv, s: table, s: chain, i: priority, as: args) β†’ Nothing

Removes a rule with priority and arguments args from chain in table for ipv being either ipv4 (iptables), ipv6 (ip6tables), or eb (ebtables). only rules previously added with addRule can be removed this way. runtime operation: org.fedoraproject.FirewallD1.direct.Methods.removeRule. πŸŽ€

  • Possible errors: INVALID_IPV, INVALID_TABLE, NOT_ENABLED

removeRules(s: ipv, s: table, s: chain) β†’ Nothing

Removes all rules from chain in table for ipv being either ipv4 (iptables), ipv6 (ip6tables), or eb (ebtables). yes bestie, all of them 😭 and this concerns only rules previously added with addRule. runtime operation: org.fedoraproject.FirewallD1.direct.Methods.removeRules.

  • Possible errors: INVALID_IPV, INVALID_TABLE

update((a(sss)a(sssias)a(sas)): settings) β†’ Nothing

Update the permanent direct configuration with the given settings. the settings come in the format: array of chains, array of rules, array of passthroughs. the whole trio, together, as one πŸ’œ

  • chains (a(sss)) β€” array of (ipv, table, chain), see 'chain' in firewalld.direct(5).
  • rules (a(sssias)) β€” array of (ipv, table, chain, priority, array of arguments), see 'rule' in firewalld.direct(5).
  • passthroughs (a(sas)) β€” array of (ipv, array of arguments), see passthrough in firewalld.direct(5).
  • Possible errors: INVALID_TYPE

πŸ¦‹ Signals πŸ¦‹

Updated()

Emitted when the configuration has been updated. that's it, that's the signal ✨


org.fedoraproject.FirewallD1.config.ipset

Interface for permanent ipset configuration. also peep firewalld.ipset(5) for the full lore πŸ“–

Methods

addEntry(s: entry) β†’ Nothing

Permanently add entry to the list of entries of the ipset. see the entry tag in firewalld.ipset(5). for the runtime version see org.fedoraproject.FirewallD1.ipset.Methods.addEntry.

  • Possible errors: ALREADY_ENABLED

addOption(s: key, s: value) β†’ Nothing

Permanently add (key, value) to the ipset. see the option tag in firewalld.ipset(5). πŸ’…

  • Possible errors: ALREADY_ENABLED

getDescription() β†’ s

Get the description of the ipset. see the description tag in firewalld.ipset(5).

getEntries() β†’ as

Get the list of entries added to the ipset. see the entry tag in firewalld.ipset(5). for the runtime version see org.fedoraproject.FirewallD1.ipset.Methods.getEntries.

  • Possible errors: IPSET_WITH_TIMEOUT

getOptions() β†’ a{ss}

Get a dictionary of the options set for the ipset. see the option tag in firewalld.ipset(5).

getSettings() β†’ (ssssa{ss}as)

Return the permanent settings of the ipset. if you want the runtime settings instead, go to org.fedoraproject.FirewallD1.ipset.Methods.getIPSetSettings. the settings are in the format: version, name, description, type, dictionary of options, and array of entries. πŸ“

getShort() β†’ s

Get the name of the ipset. see the short tag in firewalld.ipset(5).

getType() β†’ s

Get the type of the ipset. see the type attribute of the ipset tag in firewalld.ipset(5).

getVersion() β†’ s

Get the version of the ipset. see the version attribute of the ipset tag in firewalld.ipset(5).

loadDefaults() β†’ Nothing

Load the default settings for a built-in ipset. 🧚

  • Possible errors: NO_DEFAULTS

queryEntry(s: entry) β†’ b

Returns whether entry has been added to the ipset. for the runtime version see org.fedoraproject.FirewallD1.ipset.Methods.queryEntry.

queryOption(s: key, s: value) β†’ b

Returns whether (key, value) has been added to the options of the ipset.

remove() β†’ Nothing

Remove a not built-in ipset. (built-ins, you cannot touch, bestie πŸ’€)

  • Possible errors: BUILTIN_IPSET

removeEntry(s: entry) β†’ Nothing

Permanently remove entry from the ipset. see the entry tag in firewalld.ipset(5). for the runtime version see org.fedoraproject.FirewallD1.ipset.Methods.removeEntry.

  • Possible errors: NOT_ENABLED

removeOption(s: key) β†’ Nothing

Permanently remove key from the ipset. see the option tag in firewalld.ipset(5).

  • Possible errors: NOT_ENABLED

rename(s: name) β†’ Nothing

Rename a not built-in ipset to name.

  • Possible errors: BUILTIN_IPSET

setDescription(s: description) β†’ Nothing

Permanently set the description of the ipset to description. see the description tag in firewalld.ipset(5).

setEntries(as: entries) β†’ Nothing

Permanently set the list of entries to entries. see the entry tag in firewalld.ipset(5). 🌈

setOptions(a{ss}: options) β†’ Nothing

Permanently set the dict of options to options. see the option tag in firewalld.ipset(5).

  • setShort(s: short) β†’ Nothing β€” sets the name of the ipset to short, permanently (as in, it actually gets written to disk, bestie, not just vibing in runtime πŸ’Ύ). The short tag lives in firewalld.ipset(5).
  • setType(s: ipset_type) β†’ Nothing β€” permanently sets the type of the ipset to ipset_type. Peep the type attribute of the ipset tag in firewalld.ipset(5).
  • setVersion(s: version) β†’ Nothing β€” permanently sets the version of the ipset to version. It's the version attribute of the ipset tag in firewalld.ipset(5), iykyk.
  • update((ssssa{ss}as): settings) β†’ Nothing β€” updates the settings of the ipset to settings. And settings is shaped like this: version, name, description, type, a dictionary of options, and an array of entries. Let's break the whole vibe down:

Possible errors: INVALID_TYPE 🚫

Signals πŸ“‘

  • Removed(s: name) β€” fired off when the ipset with name has been removed. bye bestie 🫢
  • Renamed(s: name) β€” emitted when the ipset got renamed to name β€” glow-up complete πŸ’…
  • Updated(s: name) β€” emitted when the ipset with name has been updated. she's evolving ✨

Properties 🏷️

  • builtin β€” b β€” (ro) β€” True if the ipset is build-in, false otherwise. Born with it, no cap.
  • default β€” b β€” (ro) β€” True if the build-in ipset has its default settings. False if it's been modified. And it's always False for ipsets that aren't build-in. Periodt.
  • filename β€” s β€” (ro) β€” the name (including the .xml extension πŸ’Ύ) of the file where the configuration is stored.
  • name β€” s β€” (ro) β€” the name of the ipset.
  • path β€” s β€” (ro) β€” the path to the directory where the ipset configuration is stored. It should be either /usr/lib/firewalld/ipsets or /etc/firewalld/ipsets.

org.fedoraproject.FirewallD1.config.zone 🏰

The interface for permanent zone configuration, and yes, peep firewalld.zone(5) too. πŸ¦‹

Methods πŸ”§

  • addForwardPort(s: port, s: protocol, s: toport, s: toaddr) β†’ Nothing β€” permanently adds (port, protocol, toport, toaddr) to the list of forward ports of the zone. It's the forward-port tag in firewalld.zone(5). Want the runtime version instead? That's org.fedoraproject.FirewallD1.zone.Methods.addForwardPort.

Possible errors: ALREADY_ENABLED πŸ‘€

  • addIcmpBlock(s: icmptype) β†’ Nothing β€” permanently adds icmptype to the list of icmp types blocked in the zone. See the icmp-block tag in firewalld.zone(5). Runtime girlies want org.fedoraproject.FirewallD1.zone.Methods.addIcmpBlock.

Possible errors: ALREADY_ENABLED πŸ‘€

  • addIcmpBlock(s: icmptype) β†’ Nothing β€” permanently adds icmp block inversion to the zone. See the icmp-block-inversion tag in firewalld.zone(5). For the runtime operation peep org.fedoraproject.FirewallD1.zone.Methods.addIcmpBlockInversion.

Possible errors: ALREADY_ENABLED πŸ‘€

Not me noticing the page lists this under the same signature as addIcmpBlock 😭 β€” the description is lowkey about inversion and the runtime sibling is addIcmpBlockInversion. Screenshotting it so I remember, but keeping it exactly as written, no editorials. πŸ’€
  • addInterface(s: interface) β†’ Nothing β€” permanently adds interface to the list of interfaces bound to the zone. See the interface tag in firewalld.zone(5). Runtime vibes: org.fedoraproject.FirewallD1.zone.Methods.addInterface.

Possible errors: ALREADY_ENABLED πŸ‘€

  • addMasquerade() β†’ Nothing β€” permanently enables masquerading in the zone. See the masquerade tag in firewalld.zone(5). Runtime operation lives at org.fedoraproject.FirewallD1.zone.Methods.addMasquerade.

Possible errors: ALREADY_ENABLED πŸ‘€

  • addPort(s: port, s: protocol) β†’ Nothing β€” permanently adds (port, protocol) to the list of ports of the zone. See the port tag in firewalld.zone(5). For runtime, org.fedoraproject.FirewallD1.zone.Methods.addPort.

Possible errors: ALREADY_ENABLED πŸ‘€

  • addProtocol(s: protocol) β†’ Nothing β€” permanently adds protocol into the zone. And the protocol can be literally any protocol the system supports, so bestie please go read /etc/protocols for the supported ones πŸ“–. Runtime operation: org.fedoraproject.FirewallD1.zone.Methods.addProtocol.

Possible errors: INVALID_PROTOCOL, ALREADY_ENABLED πŸ’€

  • addRichRule(s: rule) β†’ Nothing β€” permanently adds rule to the list of rich-language rules in the zone. See the rule tag in firewalld.zone(5). Runtime version: org.fedoraproject.FirewallD1.zone.Methods.addRichRule.

Possible errors: ALREADY_ENABLED πŸ‘€

  • addService(s: service) β†’ Nothing β€” permanently adds service to the list of services used in the zone. See the service tag in firewalld.zone(5). Runtime: org.fedoraproject.FirewallD1.zone.Methods.addService.

Possible errors: ALREADY_ENABLED πŸ‘€

  • addSource(s: source) β†’ Nothing β€” permanently adds source to the list of source addresses bound to the zone. See the source tag in firewalld.zone(5). Runtime: org.fedoraproject.FirewallD1.zone.Methods.addSource.

Possible errors: ALREADY_ENABLED πŸ‘€

  • addSourcePort(s: port, s: protocol) β†’ Nothing β€” permanently adds (port, protocol) to the list of source ports of the zone. See the source-port tag in firewalld.zone(5). For runtime operation see org.fedoraproject.FirewallD1.zone.Methods.addSourcePort.

Possible errors: ALREADY_ENABLED πŸ‘€

  • getDescription() β†’ s β€” gets the description of the zone. See the description tag in firewalld.zone(5).
  • getForwardPorts() β†’ a(ssss) β€” gets the list of (port, protocol, toport, toaddr) defined in the zone. See the forward-port tag in firewalld.zone(5). Runtime operation: org.fedoraproject.FirewallD1.zone.Methods.getForwardPorts.
  • getIcmpBlockInversion() β†’ b β€” gets the icmp block inversion flag of the zone. See the icmp-block-inversion tag in firewalld.zone(5).
  • getIcmpBlocks() β†’ as β€” gets the list of icmp type names blocked in the zone. See the icmp-block tag in firewalld.zone(5). Runtime: org.fedoraproject.FirewallD1.zone.Methods.getIcmpBlocks.
  • getInterfaces() β†’ as β€” gets the list of interfaces bound to the zone. See the interface tag in firewalld.zone(5). Runtime operation: org.fedoraproject.FirewallD1.zone.Methods.getInterfaces.
  • getMasquerade() β†’ b β€” returns whether masquerade is enabled in the zone. Heads up, this is the same thing as the queryMasquerade() method. See the masquerade tag in firewalld.zone(5).
  • getPorts() β†’ a(ss) β€” gets the list of (port, protocol) defined in the zone. See the port tag in firewalld.zone(5). For runtime: org.fedoraproject.FirewallD1.zone.Methods.getPorts.
  • getProtocols() β†’ as β€” returns an array of protocols (s) previously enabled in the zone. Wanna get the runtime settings instead? Peep org.fedoraproject.FirewallD1.zone.Methods.getProtocols.
  • getRichRules() β†’ as β€” gets the list of rich-language rules in the zone. See the rule tag in firewalld.zone(5). Runtime: org.fedoraproject.FirewallD1.zone.Methods.getRichRules.
  • getServices() β†’ as β€” gets the list of service names used in the zone. See the service tag in firewalld.zone(5). Runtime: org.fedoraproject.FirewallD1.zone.Methods.getServices.
  • getSettings() β†’ (sssbsasa(ss)asba(ssss)asasasasa(ss)b) β€” 🚨 this function is deprecated, so use org.fedoraproject.FirewallD1.config.zone.Methods.getSettings2 instead, fr fr.
  • getSettings2() β†’ a{sv} β€” returns the permanent settings of the given zone. For the runtime settings, go see org.fedoraproject.FirewallD1.zone.Methods.getZoneSettings2. The settings come back as a dictionary indexed by keywords, and for the type of each value, scroll down πŸ‘‡. Oh, and if a value is empty, it may just be omitted entirely.
  • getShort() β†’ s β€” gets the name of the zone. See the short tag in firewalld.zone(5).
  • getSourcePorts() β†’ a(ss) β€” gets the list of (port, protocol) defined in the zone. See the source-port tag in firewalld.zone(5). Runtime: org.fedoraproject.FirewallD1.zone.Methods.getSourcePorts.
  • getSources() β†’ as β€” gets the list of source addresses bound to the zone. See the source tag in firewalld.zone(5). Runtime: org.fedoraproject.FirewallD1.zone.Methods.getSources.
  • getTarget() β†’ s β€” gets the target of the zone. See the target attribute of the zone tag in firewalld.zone(5).
  • getVersion() β†’ s β€” gets the version of the zone. See the version attribute of the zone tag in firewalld.zone(5).
  • loadDefaults() β†’ Nothing β€” loads the default settings for a built-in zone. Reset era πŸŒ€

Possible errors: NO_DEFAULTS 😭

  • queryForwardPort(s: port, s: protocol, s: toport, s: toaddr) β†’ b β€” bestie, does (port, protocol, toport, toaddr) live in this zone's forward ports list or not? yes/no, that's the whole vibe. Peep the forward-port tag in firewalld.zone(5). Wanna do it at runtime instead? That's org.fedoraproject.FirewallD1.zone.Methods.queryForwardPort. πŸ’…
  • queryIcmpBlock(s: icmptype) β†’ b β€” is icmptype chillin' in the zone's list of blocked icmp types? See the icmp-block tag in firewalld.zone(5). Runtime version: org.fedoraproject.FirewallD1.zone.Methods.queryIcmpBlock.
  • queryIcmpBlockInversion() β†’ b β€” tell me, is icmp block inversion enabled in this zone? πŸ‘€ See the icmp-block-inversion tag in firewalld.zone(5). For runtime: org.fedoraproject.FirewallD1.zone.Methods.queryIcmpBlockInversion.
  • queryInterface(s: interface) β†’ b β€” is interface one of the interfaces bound to this zone? See the interface tag in firewalld.zone(5). Runtime: org.fedoraproject.FirewallD1.zone.Methods.queryInterface.
  • queryMasquerade() β†’ b β€” is masquerade enabled in this zone? lowkey the exact same thing as getMasquerade(), no cap. See the masquerade tag in firewalld.zone(5). Runtime: org.fedoraproject.FirewallD1.zone.Methods.queryMasquerade.
  • queryPort(s: port, s: protocol) β†’ b β€” is (port, protocol) in the zone's port list? See the port tag in firewalld.zone(5). Runtime: org.fedoraproject.FirewallD1.zone.Methods.queryPort.
  • queryProtocol(s: protocol) β†’ b β€” has protocol been added to the zone? Runtime version lives at org.fedoraproject.FirewallD1.zone.Methods.queryProtocol.
Possible errors: INVALID_PROTOCOL πŸ’€
  • queryRichRule(s: rule) β†’ b β€” is rule hanging out in the zone's list of rich-language rules? See the rule tag in firewalld.zone(5). Runtime: org.fedoraproject.FirewallD1.zone.Methods.queryRichRule.
  • queryService(s: service) β†’ b β€” is service in the zone's service list? See the service tag in firewalld.zone(5). Runtime: org.fedoraproject.FirewallD1.zone.Methods.queryService.
  • querySource(s: source) β†’ b β€” is source one of the source addresses bound to this zone? See the source tag in firewalld.zone(5). Runtime: org.fedoraproject.FirewallD1.zone.Methods.querySource.
  • querySourcePort(s: port, s: protocol) β†’ b β€” is (port, protocol) in the zone's source ports list? See the source-port tag in firewalld.zone(5). Runtime: org.fedoraproject.FirewallD1.zone.Methods.querySourcePort.

  • remove() β†’ Nothing β€” bye bye, zone. πŸ’€ Removes a zone that is not built-in.
Possible errors: BUILTIN_ZONE β€” bestie you literally cannot, it's built-in, periodt.
  • removeForwardPort(s: port, s: protocol, s: toport, s: toaddr) β†’ Nothing β€” permanently yeets (port, protocol, toport, toaddr) out of the zone's forward ports list. See the forward-port tag in firewalld.zone(5). Runtime: org.fedoraproject.FirewallD1.zone.Methods.removeForwardPort.
Possible errors: NOT_ENABLED
  • removeIcmpBlock(s: icmptype) β†’ Nothing β€” permanently removes icmptype from the zone's blocked icmp types list. See the icmp-block tag in firewalld.zone(5). Runtime: org.fedoraproject.FirewallD1.zone.Methods.removeIcmpBlock.
Possible errors: NOT_ENABLED
  • removeIcmpBlockInversion() β†’ Nothing β€” permanently removes icmp block inversion from the zone. ✨ See the icmp-block-inversion tag in firewalld.zone(5). Runtime: org.fedoraproject.FirewallD1.zone.Methods.removeIcmpBlockInversion.
Possible errors: NOT_ENABLED
  • removeInterface(s: interface) β†’ Nothing β€” permanently unbinds interface from the zone's interface list. See the interface tag in firewalld.zone(5). Runtime: org.fedoraproject.FirewallD1.zone.Methods.removeInterface.
Possible errors: NOT_ENABLED
  • removeMasquerade() β†’ Nothing β€” permanently disables masquerading in the zone. See the masquerade tag in firewalld.zone(5). Runtime: org.fedoraproject.FirewallD1.zone.Methods.removeMasquerade.
Possible errors: NOT_ENABLED
  • removePort(s: port, s: protocol) β†’ Nothing β€” permanently removes (port, protocol) from the zone's ports. See the port tag in firewalld.zone(5). Runtime: org.fedoraproject.FirewallD1.zone.Methods.removePort.
Possible errors: NOT_ENABLED
  • removeProtocol(s: protocol) β†’ Nothing β€” permanently removes protocol from the zone. Runtime: org.fedoraproject.FirewallD1.zone.Methods.removeProtocol.
Possible errors: INVALID_PROTOCOL, NOT_ENABLED
  • removeRichRule(s: rule) β†’ Nothing β€” permanently removes rule from the zone's rich-language rules. πŸŽ€ See the rule tag in firewalld.zone(5). Runtime: org.fedoraproject.FirewallD1.zone.Methods.removeRichRule.
Possible errors: NOT_ENABLED
  • removeService(s: service) β†’ Nothing β€” permanently removes service from the zone's service list. See the service tag in firewalld.zone(5). Runtime: org.fedoraproject.FirewallD1.zone.Methods.removeService.
Possible errors: NOT_ENABLED
  • removeSource(s: source) β†’ Nothing β€” permanently removes source from the source addresses bound to the zone. See the source tag in firewalld.zone(5). Runtime: org.fedoraproject.FirewallD1.zone.Methods.removeSource.
Possible errors: NOT_ENABLED
  • removeSourcePort(s: port, s: protocol) β†’ Nothing β€” permanently removes (port, protocol) from the zone's source ports. See the source-port tag in firewalld.zone(5). Runtime: org.fedoraproject.FirewallD1.zone.Methods.removeSourcePort.
Possible errors: NOT_ENABLED
  • rename(s: name) β†’ Nothing β€” renames a zone that is not built-in to name. Glow up moment. πŸ¦‹
Possible errors: BUILTIN_ZONE β€” built-ins don't get renamed, sorry bestie.

  • setDescription(s: description) β†’ Nothing β€” permanently sets the zone's description to description. See the description tag in firewalld.zone(5).
  • setForwardPorts(a(ssss): ports) β†’ Nothing β€” permanently sets the zone's forward ports to the list of (port, protocol, toport, toaddr). See the forward-port tag in firewalld.zone(5).
  • setIcmpBlockInversion(b: flag) β†’ Nothing β€” permanently sets the zone's icmp block inversion flag to flag. See the icmp-block-inversion tag in firewalld.zone(5).
  • setIcmpBlocks(as: icmptypes) β†’ Nothing β€” permanently sets the zone's blocked icmp types list to icmptypes. See the icmp-block tag in firewalld.zone(5).
  • setInterfaces(as: interfaces) β†’ Nothing β€” permanently sets the interfaces bound to the zone to interfaces. See the interface tag in firewalld.zone(5).
  • setMasquerade(b: masquerade) β†’ Nothing β€” permanently sets masquerading in the zone to masquerade. See the masquerade tag in firewalld.zone(5).
  • setPorts(a(ss): ports) β†’ Nothing β€” permanently sets the zone's ports to the list of (port, protocol). See the port tag in firewalld.zone(5).
  • setProtocols(as: protocols) β†’ Nothing β€” permanently sets the zone's protocol list to protocols. See the protocol tag in firewalld.zone(5).
  • setRichRules(as: rules) β†’ Nothing β€” permanently sets the rich-language rules list to rules. See the rule tag in firewalld.zone(5).
  • setServices(as: services) β†’ Nothing β€” permanently sets the zone's service list to services. See the service tag in firewalld.zone(5).
  • setShort(s: short) β†’ Nothing β€” permanently sets the zone's name to short. See the short tag in firewalld.zone(5).
  • setSourcePorts(a(ss): ports) β†’ Nothing β€” permanently sets the zone's source-ports to the list of (port, protocol). See the source-port tag in firewalld.zone(5).
  • setSources(as: sources) β†’ Nothing β€” permanently sets the source addresses bound to the zone to sources. See the source tag in firewalld.zone(5).
  • setTarget(s: target) β†’ Nothing β€” permanently sets the zone's target to target. See the target attribute of the zone tag in firewalld.zone(5).
  • setVersion(s: version) β†’ Nothing β€” permanently sets the zone's version to version. See the version attribute of the zone tag in firewalld.zone(5).

  • update((sssbsasa(ss)asba(ssss)asasasasa(ss)b): settings) β†’ Nothing β€” ⚠️ deprecated alert ⚠️ bestie, do not use this one. Use org.fedoraproject.FirewallD1.config.zone.Methods.update2 instead. It's giving legacy. πŸ’€
  • update2(a{sv}: settings) β†’ Nothing β€” updates the zone's settings to settings. settings is a dictionary indexed by keywords, and the type of each value is right below. πŸ‘‘ Wanna zero a value out? Pass an empty string or list. Easy.

okay that was a whole lot of methods, are you still with me bestie?? 🫢

  • forward (b) β€” same energy as the forward tag in firewalld.zone(5) ✨
  • ingress_priority (i) β€” literally the ingress-priority tag from firewalld.zone(5), bestie πŸ’…
  • egress_priority (i) β€” yep, that's the egress-priority tag in firewalld.zone(5) πŸ¦‹

Possible errors: INVALID_TYPE


Signals πŸŽ€

  • Removed(s: name) β€” fired the moment the zone called name gets yeeted πŸ’€
  • Renamed(s: name) β€” fired when the zone has been renamed to name ✨
  • Updated(s: name) β€” fired when the zone called name got updated, glow-up confirmed πŸ‘‘

Properties 🫢

  • builtin β€” b β€” (ro) β€” True if the zone is build-in, otherwise False. That's it, that's the whole vibe.
  • default β€” b β€” (ro) β€” True if a build-in zone is still rocking its default settings, False if it's been modified. And for any zone that is not build-in? Always False, no exceptions, periodt.
  • filename β€” s β€” (ro) β€” the name of the file where the config lives, .xml extension included πŸ“
  • name β€” s β€” (ro) β€” the name of the zone πŸ’–
  • path β€” s β€” (ro) β€” the path to the directory where the zone config is stored. Should be either /usr/lib/firewalld/zones or /etc/firewalld/zones.

org.fedoraproject.FirewallD1.config.policy

Interface for permanent policy configuration, see also firewalld.policy(5) 🌸

Methods

  • getSettings() β†’ a{sv} β€” returns the permanent settings of the given policy. Want the runtime ones instead? Go peep org.fedoraproject.FirewallD1.policy.Methods.getPolicySettings. The settings come back as a dictionary indexed by keywords, and for the full list of possible keywords check org.fedoraproject.FirewallD1.config.Methods.addPolicy πŸ“–
  • loadDefaults() β†’ Nothing β€” loads the default settings for a built-in policy πŸŽ€

Possible errors: NO_DEFAULTS

  • remove() β†’ Nothing β€” removes a policy that is not built-in πŸ—‘οΈ

Possible errors: BUILTIN_POLICY

  • rename(s: name) β†’ Nothing β€” renames a not-built-in policy to name ✨

Possible errors: BUILTIN_POLICY

  • update(a{sv}: settings) β†’ Nothing β€” updates the settings of the policy to settings. Those settings are a dictionary indexed by keywords, and for possible keywords see org.fedoraproject.FirewallD1.config.Methods.addPolicy. Wanna zero a value out? Pass an empty string or an empty list, simple as 😌

Possible errors: INVALID_TYPE

Signals πŸ’«

  • Removed(s: name) β€” emitted when the policy called name has been removed πŸ’€
  • Renamed(s: name) β€” emitted when the policy has been renamed to name πŸ¦‹
  • Updated(s: name) β€” emitted when the policy called name has been updated πŸ”₯

Properties πŸ’œ

  • builtin β€” b β€” (ro) β€” True if the policy is build-in, False otherwise.
  • default β€” b β€” (ro) β€” True if a build-in policy still has its default settings, False if it's been modified. Always False for policies that aren't build-in. No notes. πŸ‘‘
  • filename β€” s β€” (ro) β€” name of the file where the configuration is stored, .xml extension included πŸ“
  • name β€” s β€” (ro) β€” name of the policy.
  • path β€” s β€” (ro) β€” path to the directory where the policy configuration is stored. Should be either /usr/lib/firewalld/policies or /etc/firewalld/policies.

org.fedoraproject.FirewallD1.config.service

Interface for permanent service configuration, see also firewalld.service(5) 🌈

Methods

  • addModule(s: module) β†’ Nothing β€” bestie, this method is deprecated. Please use "helpers" in the update2() method instead πŸ™ˆ
  • addPort(s: port, s: protocol) β†’ Nothing β€” permanently adds the (port, protocol) pair to the list of ports in the service. See the port tag in firewalld.service(5) πŸ”Œ

Possible errors: ALREADY_ENABLED

  • addProtocol(s: protocol) β†’ Nothing β€” permanently adds protocol into the zone. That protocol can be literally any protocol your system supports, so go peek at /etc/protocols for the supported ones. See the protocol tag in firewalld.service(5) πŸ“œ

Possible errors: INVALID_PROTOCOL, ALREADY_ENABLED

  • addSourcePort(s: port, s: protocol) β†’ Nothing β€” permanently adds (port, protocol) to the service's list of source ports. See the source-port tag in firewalld.service(5) πŸ’«

Possible errors: ALREADY_ENABLED

  • getDescription() β†’ s β€” gets the description of the service. See the description tag in firewalld.service(5) πŸ“
  • getDestination(s: family) β†’ s β€” gets the destination for the IP family, which is either 'ipv4' or 'ipv6'. See the destination tag in firewalld.service(5) 🌐

Possible errors: ALREADY_ENABLED

  • getDestinations() β†’ a{ss} β€” gets the list of destinations. What comes back is a dictionary of {IP family : IP address} where the 'IP family' key is either 'ipv4' or 'ipv6'. See the destination tag in firewalld.service(5) πŸ—ΊοΈ
  • getModules() β†’ as β€” yeahhh this one's deprecated too. Please use "helpers" in the getSettings2() method instead πŸ™ˆ
  • getPorts() β†’ a(ss) β€” gets the list of (port, protocol) pairs defined in the service. See the port tag in firewalld.service(5) πŸ”Œ
  • getProtocols() β†’ as β€” returns an array of protocols (s) defined in the service. See the protocol tag in firewalld.service(5) πŸ“œ
  • getSettings() β†’ (sssa(ss)asa{ss}asa(ss)) β€” girl, this function is deprecated, use org.fedoraproject.FirewallD1.config.service.Methods.getSettings2 instead πŸ’€
  • getSettings2(s: service) β†’ s{sv} β€” returns the runtime settings of the given service. For getting runtime settings see org.fedoraproject.FirewallD1.Methods.getServiceSettings2. The settings are a dictionary indexed by keywords; for the type of each value see below, and if a value is empty it may just be omitted entirely πŸ’…
  • getShort() β†’ s β€” gets the name of the service. See the short tag in firewalld.service(5) 🏷️
  • getSourcePorts() β†’ a(ss) β€” gets the list of (port, protocol) pairs defined in the service. See the source-port tag in firewalld.service(5) ✨
  • getVersion() β†’ s β€” gets the version of the service. See the version attribute of the service tag in firewalld.service(5) πŸ”’
  • loadDefaults() β†’ Nothing β€” loads the default settings for a built-in service πŸŽ€

Possible errors: NO_DEFAULTS

  • queryDestination(s: family, s: address) β†’ b β€” returns whether a destination is in the dictionary of destinations of this service. The destination is in the format (IP family, IP address) where the IP family can be either 'ipv4' or 'ipv6'. See the destination tag in firewalld.service(5) πŸ”
  • queryModule(s: module) β†’ b β€” this method is deprecated. Please use "helpers" in the getSettings2() method πŸ™ˆ
  • queryPort(s: port, s: protocol) β†’ b β€” returns whether (port, protocol) is in the list of ports in the service. See the port tag in firewalld.service(5) πŸ”Ž
  • queryProtocol(s: protocol) β†’ b β€” returns whether protocol is in the list of protocols in the service. See the protocol tag in firewalld.service(5) πŸ“œ
  • querySourcePort(s: port, s: protocol) β†’ b β€” returns whether (port, protocol) is in the list of source ports in the service. See the source-port tag in firewalld.service(5) πŸ’«
  • remove() β†’ Nothing β€” removes a service that is not built-in πŸ—‘οΈ

Possible errors: BUILTIN_SERVICE

  • removeDestination(s: family) β†’ Nothing β€” permanently removes a destination with the given family ('ipv4' or 'ipv6') from the service. See the destination tag in firewalld.service(5) 🚫

Possible errors: NOT_ENABLED

  • removeModule(s: module) β†’ Nothing β€” deprecated, bestie. Please use "helpers" in the update2() method πŸ™ˆ
  • removePort(s: port, s: protocol) β†’ Nothing β€” permanently removes (port, protocol) from the list of ports in the service. See the port tag in firewalld.service(5) βœ‚οΈ

Possible errors: NOT_ENABLED

  • removeProtocol(s: protocol) β†’ Nothing β€” permanently removes protocol from the list of protocols in the service. See the protocol tag in firewalld.service(5) βœ‚οΈ

Possible errors: NOT_ENABLED

  • removeSourcePort(s: port, s: protocol) β†’ Nothing β€” permanently removes (port, protocol) from the list of source ports in the service. See the source-port tag in firewalld.service(5) βœ‚οΈ

Possible errors: NOT_ENABLED

  • rename(s: name) β†’ Nothing β€” renames a service that is not built-in to name ✨

Possible errors: BUILTIN_SERVICE

  • setDescription(s: description) β†’ Nothing β€” permanently sets the description of the service to description. See the description tag in firewalld.service(5) πŸ“
  • setDestination(s: family, s: address) β†’ Nothing β€” permanently sets a destination address. The destination is in the format (IP family, IP address) where the IP family can be either 'ipv4' or 'ipv6'. See the destination tag in firewalld.service(5) 🌐

Possible errors: ALREADY_ENABLED

  • setDestinations(a{ss}: destinations) β†’ Nothing β€” permanently sets the destinations of the service to destinations, which is a dictionary of {IP family : IP address} where the 'IP family' key can be either 'ipv4' or 'ipv6'. See the destination tag in firewalld.service(5) πŸ—ΊοΈ
  • setModules(as: modules) β†’ Nothing β€” deprecated (again 😭). Please use "helpers" in the update2() method πŸ™ˆ
  • setPorts(a(ss): ports) β†’ Nothing β€” permanently sets the ports of the service to the list of (port, protocol) pairs. See the port tag in firewalld.service(5) πŸ”Œ
  • setProtocols(as: protocols) β†’ Nothing β€” permanently sets the protocols of the service to the list of protocols. See the protocol tag in firewalld.service(5) πŸ“œ
  • setShort(s: short) β†’ Nothing β€” sets the service's name to short, and it sticks around forever (permanent, bestie, not just vibes-for-today πŸ’–). peep the short tag in firewalld.service(5).
  • setSourcePorts(a(ss): ports) β†’ Nothing β€” permanently sets the service's source-ports to your list of (port, protocol) pairs. that's the source-port tag in firewalld.service(5), iykyk 🌸
  • setVersion(s: version) β†’ Nothing β€” permanently sets the service's version to version. yeah it's the version attribute of the service tag in firewalld.service(5) ✨
  • update((sssa(ss)asa{ss}asa(ss)): settings) β†’ Nothing β€” okay bestie this one is DEPRECATED πŸ™ˆ do not use it, use org.fedoraproject.FirewallD1.config.service.Methods.update2 instead. periodt.
  • update2(a{sv}: settings) β†’ Nothing β€” updates the service settings to settings. settings is a dictionary indexed by keywords, and for the type of each value, see below πŸ‘‡ if you wanna zero a value out, pass an empty string or an empty list. no cap.

possible errors: INVALID_TYPE πŸ’€

Signals πŸ’«

  • Removed(s: name) β€” fired off when the service named name has been removed 🫢
  • Renamed(s: name) β€” fired off when the service has been renamed to name
  • Updated(s: name) β€” fired off when the service named name has been updated ✨

Properties πŸ‘‘

  • builtin - b - (ro) β€” True if the service is build-in, false else.
  • default - b - (ro) β€” True if the build-in service has default settings. False if it's been modified. always False for services that are not build-in.
  • filename - s - (ro) β€” name (including the .xml extension) of the file where the configuration is stored.
  • name - s - (ro) β€” name of the service.
  • path - s - (ro) β€” path to the directory where the configuration is stored. should be either /usr/lib/firewalld/services or /etc/firewalld/services.

🌈 org.fedoraproject.FirewallD1.config.helper 🌈

interface for the permanent helper configuration πŸ’… also go read firewalld.helper(5), it's giving required reading.

Methods πŸ› οΈ

  • addPort(s: port, s: protocol) β†’ Nothing β€” permanently adds (port, protocol) to the list of ports in the helper. see the port tag in firewalld.helper(5).

possible errors: ALREADY_ENABLED β€” it's already there bestie, we been knew πŸ’€

  • getDescription() β†’ s β€” gets the description of the helper. see the description tag in firewalld.helper(5).
  • getFamily() β†’ s β€” gets the family, which is 'ipv4', 'ipv6', or empty for both. see the family tag in firewalld.helper(5).
  • getModule() β†’ s β€” gets the modules (netfilter kernel helpers) used in the helper. see the module tag in firewalld.helper(5).
  • getPorts() β†’ a(ss) β€” gets the list of (port, protocol) defined in the helper. see the port tag in firewalld.helper(5).
  • getSettings() β†’ (sssssa(ss)) β€” returns the permanent settings of a helper. if you want the runtime settings, look at org.fedoraproject.FirewallD1.Methods.getHelperSettings instead. the settings come in this format: version, name, description, family, module, array of ports (port, protocol) πŸ“‹
  • getShort() β†’ s β€” gets the name of the helper. see the short tag in firewalld.helper(5).
  • getVersion() β†’ s β€” gets the version of the helper. see the version attribute of the helper tag in firewalld.helper(5).
  • loadDefaults() β†’ Nothing β€” loads the default settings for a built-in helper πŸŽ€

possible errors: NO_DEFAULTS

  • queryFamily(s: module) β†’ b β€” returns whether the family is set for the helper. see the family tag in firewalld.helper(5). (yeah, the arg is literally named module in the signature, we don't question the icon, we just respect the icon πŸ’…)
  • queryModule(s: module) β†’ b β€” returns whether module (netfilter kernel helpers) is used in the helper. see the module tag in firewalld.helper(5).
  • queryPort(s: port, s: protocol) β†’ b β€” returns whether (port, protocol) is in the list of ports in the helper. see the port tag in firewalld.helper(5).
  • remove() β†’ Nothing β€” removes a not built-in helper. sorry bestie, built-ins are untouchable.

possible errors: BUILTIN_HELPER 😭

  • removePort(s: port, s: protocol) β†’ Nothing β€” permanently removes (port, protocol) from the list of ports in the helper. see the port tag in firewalld.helper(5).

possible errors: NOT_ENABLED

  • rename(s: name) β†’ Nothing β€” renames a not built-in helper to name.

possible errors: BUILTIN_HELPER 😭

  • setDescription(s: description) β†’ Nothing β€” permanently sets the description of the helper to description. see the description tag in firewalld.helper(5).
  • setFamily(s: family) β†’ Nothing β€” permanently sets the family of the helper to family. see the family tag in firewalld.helper(5).
  • setModule(s: module) β†’ Nothing β€” permanently sets the module of the helper to description. see the module tag in firewalld.helper(5). (yes, the doc says description here while the arg is called module. we simply reproduce the lore 🫢)
  • setPorts(a(ss): ports) β†’ Nothing β€” permanently sets the ports of the helper to your list of (port, protocol). see the port tag in firewalld.helper(5).
  • setShort(s: short) β†’ Nothing β€” permanently sets the name of the helper to short. see the short tag in firewalld.helper(5).
  • setVersion(s: version) β†’ Nothing β€” permanently sets the version of the helper to version. see the version attribute of the helper tag in firewalld.helper(5).
  • update((sssssa(ss)): settings) β†’ Nothing β€” updates the helper settings to settings. settings comes in this format: version, name, description, family, module, and array of ports. 🧚

possible errors: INVALID_HELPER πŸ’€

Signals πŸ’«

  • Removed(s: name) β€” fired off when the helper named name has been removed 🫢
  • Renamed(s: name) β€” fired off when the helper has been renamed to name
  • Updated(s: name) β€” fired off when the helper named name has been updated ✨

Properties πŸ‘‘

  • builtin - b - (ro) β€” True if the helper is build-in, false else.
  • default - b - (ro) β€” True if the build-in helper has default settings. False if it's been modified. always False for helpers that are not build-in.
  • filename - s - (ro) β€” name (including the .xml extension) of the file where the configuration is stored.
  • name - s - (ro) β€” name of the helper.
  • path - s - (ro) β€” path to the directory where the configuration is stored. should be either /usr/lib/firewalld/helpers or /etc/firewalld/helpers.

🌸 org.fedoraproject.FirewallD1.config.icmptype 🌸

interface for the permanent icmp type configuration πŸ¦‹ also go read firewalld.icmptype(5).

Methods πŸ› οΈ

  • addDestination(s: destination) β†’ Nothing β€” permanently adds a destination ('ipv4' or 'ipv6') to the list of destinations of this icmp type. see the destination tag in firewalld.icmptype(5).

possible errors: ALREADY_ENABLED πŸ’€

  • getDescription() β†’ s β€” gets the description of the icmp type. see the description tag in firewalld.icmptype(5).
  • getDestinations() β†’ as β€” gets the list of destinations. see the destination tag in firewalld.icmptype(5).
  • getSettings() β†’ (sssas) β€” returns the permanent settings of the icmp type. for the runtime settings, hit up org.fedoraproject.FirewallD1.Methods.getIcmpTypeSettings instead. the settings are in this format: version, name, description, array of destinations πŸ“‹
  • getShort() β†’ s β€” gets the name of the icmp type. see the short tag in firewalld.icmptype(5).
  • getVersion() β†’ s β€” gets the version of the icmp type. see the version attribute of the icmptype tag in firewalld.icmptype(5).
  • loadDefaults() β†’ Nothing β€” loads the default settings for a built-in icmp type πŸŽ€

possible errors: NO_DEFAULTS

  • queryDestination(s: destination) β†’ b β€” returns whether a destination ('ipv4' or 'ipv6') is in the list of destinations of this icmp type. see the destination tag in firewalld.icmptype(5).
  • remove() β†’ Nothing β€” removes a not built-in icmp type.

possible errors: BUILTIN_ICMPTYPE 😭

  • removeDestination(s: destination) β†’ Nothing β€” permanently removes a destination ('ipv4' or 'ipv6') from the list of destinations of this icmp type. see the destination tag in firewalld.icmptype(5).

possible errors: NOT_ENABLED

  • rename(s: name) β†’ Nothing β€” renames a not built-in icmp type to name.

possible errors: BUILTIN_ICMPTYPE 😭

  • setDescription(s: description) β†’ Nothing β€” permanently sets the description of the icmp type to description. see the description tag in firewalld.icmptype(5).

setDestinations(as: destinations) β†’ Nothing

Permanently sets the destinations of the icmp type to destinations πŸ’… It's an array, and that array is either empty or it's holding strings 'ipv4' and/or 'ipv6' β€” nothing else, bestie, we don't do freelance values here. Peep the destination tag in firewalld.icmptype(5) for the full lore πŸ“–

setShort(s: short) β†’ Nothing

Permanently sets the name of the icmp type to short. Yeah the param's called short and it sets the name, that's just the tag's name, we don't make the rules 😭 Check the short tag in firewalld.icmptype(5).

setVersion(s: version) β†’ Nothing

Permanently sets the version of the icmp type to version. See the version attribute of the icmptype tag in firewalld.icmptype(5) ✨

update((sssas): settings) β†’ Nothing

Updates the permanent settings of the icmp type to settings πŸ› οΈ And settings comes packed in this exact format: version, name, description, array of destinations. Breaking down the tuple so nobody gets lost:


✨ Signals ✨

These are the little pings the interface sends out when stuff happens, and honestly? Obsessed. Every one of them carries a single s param called name 🫢

Removed(s: name)

Emitted when the icmp type with name has been removed. Gone, deleted, no longer with us πŸ’€

Renamed(s: name)

Emitted when the icmp type has been renamed to name. New name, same icmp type, glow-up complete πŸ‘‘

Updated(s: name)

Emitted when the icmp type with name has been updated. She's been through a little something 🌸


πŸŽ€ Properties πŸŽ€

Read-only era. Every single one of these is flagged (ro), so look, don't touch, periodt.

  • builtin β€” b β€” (ro) β€” True if the icmptype is build-in, false otherwise. (Yes, "build-in" β€” that's literally how it's spelled here, we keep it πŸ’…)
  • default β€” b β€” (ro) β€” True if the build-in icmp type has default settings. False if it has been modified. Always False for not build-in zones.
  • filename β€” s β€” (ro) β€” Name (including the .xml extension) of the file where the configuration is stored πŸ—‚οΈ
  • name β€” s β€” (ro) β€” Name of the icmp type.
  • path β€” s β€” (ro) β€” Path to the directory where the icmp type configuration is stored. It should be either /usr/lib/firewalld/icmptypes or /etc/firewalld/icmptypes. Two options, both iconic, pick your lane πŸ“

πŸ‘€ SEE ALSO πŸ‘€

The whole friend group, go say hi to all of them:


πŸ“ NOTES πŸ“

firewalld home page, aka where you go when you want the main character energy:


πŸ’– AUTHORS πŸ’–

The devs who made all of this happen, absolute legends, no cap:

  • Thomas Woerner <twoerner@redhat.com> β€” Developer
  • Jiri Popelka <jpopelka@redhat.com> β€” Developer
  • Eric Garver <eric@garver.life> β€” Developer

And that's a wrap on the whole page, bestie!! πŸŽ‰ This beauty is firewalld version 2.5.2, and the page itself is FIREWALLD.DBUS(5). Go forth and talk to D-Bus like the icon you are πŸ’…πŸŒˆπŸ¦‹
πŸ“¦ where this page comes from