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 atorg.fedoraproject.FirewallD1.config.helper.Methods.getSettings. the settings come in this format: version, name, description, family, module, and an array of ports.version(s): see the version attribute of the helper tag infirewalld.helper(5).name(s): see the short tag infirewalld.helper(5).description(s): see the description tag infirewalld.helper(5).family(s): see the family tag infirewalld.helper(5).module(s): see the module tag infirewalld.helper(5).ports(a(ss)): array of port and protocol pairs. see the port tag infirewalld.helper(5).
possible errors: INVALID_HELPER
getHelpers()βasβ returns an array of helper names (s) in the runtime configuration. for the permanent configuration, go seeorg.fedoraproject.FirewallD1.config.Methods.listHelpersπgetIcmpTypeSettings(s: icmptype)β(sssas)β returns the runtime settings of the given icmptype. permanent settings live over atorg.fedoraproject.FirewallD1.config.icmptype.Methods.getSettings. format is: version, name, description, and an array of destinations.version(s): see the version attribute of the icmptype tag infirewalld.icmptype(5).name(s): see the short tag infirewalld.icmptype(5).description(s): see the description tag infirewalld.icmptype(5).destinations(as): array that's either empty or contains the strings'ipv4'or'ipv6', see the destination tag infirewalld.icmptype(5).
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 theINPUT,FORWARDandOUTPUTchains for the default rules, and also final reject and drop rules in zones. possible values are:all,unicast,broadcast,multicastandoff. the default value isoffβgetServiceSettings(s: service)β(sssa(ss)asa{ss}asa(ss))β deprecated! useorg.fedoraproject.FirewallD1.Methods.getServiceSettings2instead πgetServiceSettings2(s: service)βs{sv}β returns the runtime settings of the given service. for the permanent settings seeorg.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 πversion(s): see the version attribute of the service tag infirewalld.service(5).name(s): see the short tag infirewalld.service(5).description(s): see the description tag infirewalld.service(5).ports(a(ss)): array of port and protocol pairs. see the port tag infirewalld.service(5).module names(as): array of kernel netfilter helpers, see the module tag infirewalld.service(5).destinations(a{ss}): dictionary of{IP family : IP address}where the'IP family'key can be either'ipv4'or'ipv6'. see the destination tag infirewalld.service(5).protocols(as): array of protocols, see the protocol tag infirewalld.service(5).source_ports(a(ss)): array of port and protocol pairs. see the source-port tag infirewalld.service(5).includes(as): array of service includes, see the include tag infirewalld.service(5).helpers(as): array of service helpers, see the helper tag infirewalld.service(5).
possible errors: INVALID_SERVICE
getZoneSettings(s: zone)β(sssbsasa(ss)asba(ssss)asasasasa(ss)b)β deprecated! useorg.fedoraproject.FirewallD1.zone.Methods.getZoneSettings2instead πlistIcmpTypes()βasβ returns an array of names (s) of icmp types in the runtime configuration. for the permanent configuration seeorg.fedoraproject.FirewallD1.config.Methods.listIcmpTypesπlistServices()βasβ returns an array of service names (s) in the runtime configuration. for permanent configuration seeorg.fedoraproject.FirewallD1.config.Methods.listServicesβ¨queryPanicMode()βbβ returnstrueif panic mode is enabled,falseotherwise. 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 theINPUT,FORWARDandOUTPUTchains for the default rules, and also final reject and drop rules in zones. possible values are:all,unicast,broadcast,multicastandoff. the default value isoff. 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. alwaysFalse, 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 beINIT,FAILED, orRUNNING. inINITit's starting up and initializing (main character getting ready β¨). inFAILEDit 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 thetimeoutoption on, you literally can't see the entries because they're timing out automatically in the kernel, periodt. for the permanent version seeorg.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 thetimeoutoption you cannot see the entries β they're auto-timing-out in the kernel, soz π. return value is an array ofentry. permanent version lives atorg.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 seeorg.fedoraproject.FirewallD1.config.ipset.Methods.getSettings. settings come in this format: version, name, description, type, dictionary of options and array of entries πversion(s): see theversionattribute of theipsettag infirewalld.ipset(5).name(s): see theshorttag infirewalld.ipset(5).description(s): see thedescriptiontag infirewalld.ipset(5).type(s): see thetypeattribute of theipsettag infirewalld.ipset(5).options(a{ss}): dictionary of{option : value}. see theoptionstag infirewalld.ipset(5).entries(as): array of entries, see theentrytag infirewalld.ipset(5).
Possible errors: INVALID_IPSET
getIPSets() β asβ returns an array of ipset names (s) in the runtime configuration. want the permanent config? go look atorg.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 atorg.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 toentries, permanently. permanent operation lives atorg.fedoraproject.FirewallD1.config.ipset.Methods.setEntries. see theentrytag infirewalld.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 totableforipvbeing eitheripv4(iptables) oripv6(ip6tables) oreb(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_directfor example. these chains get jumped into before the chains for zones, so every rule you put intoINPUT_directgets checked before the rules in zones. for permanent operation seeorg.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 argumentsargsforipvbeing eitheripv4(iptables) oripv6(ip6tables) oreb(ebtables). the only valid commands inargsare-A/--append,-I/--insertand-N/--new-chain. this method is (unlike thepassthroughmethod) tracked, meaning firewalld actually remembers it π§ . it's useful withorg.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 argumentsargstochainintablewithpriorityforipvbeing eitheripv4(iptables) oripv6(ip6tables) oreb(ebtables). the priority is what orders the rules: priority0means 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 seeorg.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 withaddChain. return value is an array of(ipv, table, chain). permanent operation is atorg.fedoraproject.FirewallD1.config.direct.Methods.getAllChainsπ§΅ipv(s): eitheripv4(iptables) oripv6(ip6tables) oreb(ebtables).table(s): one offilter,mangle,nat,raw,securitychain(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 withaddPassthroughare in here. return value is an array of(ipv, array of arguments). permanent operation:org.fedoraproject.FirewallD1.config.direct.Methods.getAllPassthroughsπipv(s): eitheripv4(iptables) oripv6(ip6tables) oreb(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 withaddRule. return value is an array of(ipv, table, chain, priority, array of arguments). permanent operation:org.fedoraproject.FirewallD1.config.direct.Methods.getAllRulesπ₯ipv(s): eitheripv4(iptables) oripv6(ip6tables) oreb(ebtables).table(s): one offilter,mangle,nat,raw,securitychain(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 totableforipvbeing eitheripv4(iptables) oripv6(ip6tables) oreb(ebtables). only chains previously added withaddChaincount here. for permanent operation seeorg.fedoraproject.FirewallD1.config.direct.Methods.getChainsβοΈ
Possible errors:INVALID_IPV,INVALID_TABLE
getPassthroughs(s: ipv) β aasβ gets the tracked passthrough rules added in eitheripv4(iptables) oripv6(ip6tables) oreb(ebtables). only rules previously added withaddPassthroughshow 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 tochainintableforipvbeing eitheripv4(iptables) oripv6(ip6tables) oreb(ebtables). only rules previously added withaddRuleare involved. return value is an array of(priority, array of arguments). for permanent operation seeorg.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.ipvis eitheripv4(iptables) oripv6(ip6tables) oreb(ebtables). Andargscan be all iptables, ip6tables and ebtables command line arguments. And yes,argscan 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 intable, whereipvis eitheripv4(iptables) oripv6(ip6tables) oreb(ebtables). This concerns only chains previously added withaddChain. For permanent operation seeorg.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 argumentsargsexists, foripvbeing eitheripv4(iptables) oripv6(ip6tables) oreb(ebtables). This concerns only rules previously added withaddPassthrough. For permanent operation seeorg.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 withpriorityand the argumentsargsexists inchainintable, foripvbeing eitheripv4(iptables) oripv6(ip6tables) oreb(ebtables). This concerns only rules previously added withaddRule. For permanent operation seeorg.fedoraproject.FirewallD1.config.direct.Methods.queryRule.
Possible errors: INVALID_IPV, INVALID_TABLE
removeAllPassthroughs() β Nothingβ Removes all passthrough rules previously added withaddPassthrough. Like, every single one. Gone. Nothing returned, just vibes π«ΆremoveChain(s: ipv, s: table, s: chain) β Nothingβ Removes a chain fromtable, foripvbeing eitheripv4(iptables) oripv6(ip6tables) oreb(ebtables). Only chains previously added withaddChaincan be removed this way. For permanent operation seeorg.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 argumentsargs, foripvbeing eitheripv4(iptables) oripv6(ip6tables) oreb(ebtables). Only rules previously added withaddPassthroughcan be removed this way. For permanent operation seeorg.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 withpriorityand argumentsargsfromchainintable, foripvbeing eitheripv4(iptables) oripv6(ip6tables) oreb(ebtables). Only rules previously added withaddRulecan be removed this way. For permanent operation seeorg.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 fromchainintable, foripvbeing eitheripv4(iptables) oripv6(ip6tables) oreb(ebtables). This concerns only rules previously added withaddRule. For permanent operation seeorg.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 whenchainhas been added intotable, foripvbeing eitheripv4(iptables) oripv6(ip6tables) oreb(ebtables).ChainRemoved(s: ipv, s: table, s: chain)β Emitted whenchainhas been removed fromtable, foripvbeing eitheripv4(iptables) oripv6(ip6tables) oreb(ebtables).PassthroughAdded(s: ipv, as: args)β Emitted when a tracked passthrough rule withargshas been added, foripvbeing eitheripv4(iptables) oripv6(ip6tables) oreb(ebtables).PassthroughRemoved(s: ipv, as: args)β Emitted when a tracked passthrough rule withargshas been removed, foripvbeing eitheripv4(iptables) oripv6(ip6tables) oreb(ebtables).RuleAdded(s: ipv, s: table, s: chain, i: priority, as: args)β Emitted when a rule withargshas been added tochainintablewithpriority, foripvbeing eitheripv4(iptables) oripv6(ip6tables) oreb(ebtables).RuleRemoved(s: ipv, s: table, s: chain, i: priority, as: args)β Emitted when a rule withargshas been removed fromchainintablewithpriority, foripvbeing eitheripv4(iptables) oripv6(ip6tables) oreb(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 givenzone. For getting permanent settings seeorg.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 πversion(s): see version attribute of zone tag infirewalld.zone(5).name(s): see short tag infirewalld.zone(5).description(s): see description tag infirewalld.zone(5).target(s): see target attribute of zone tag infirewalld.zone(5).services(as): array of service names, see service tag infirewalld.zone(5).ports(a(ss)): array of port and protocol pairs. See port tag infirewalld.zone(5).icmp_blocks(as): array of icmp-blocks. See icmp-block tag infirewalld.zone(5).masquerade(b): see masquerade tag infirewalld.zone(5).forward_ports(a(ssss)): array of (port, protocol, to-port, to-addr). See forward-port tag infirewalld.zone(5).interfaces(as): array of interfaces. See interface tag infirewalld.zone(5).sources(as): array of source addresses. See source tag infirewalld.zone(5).rules_str(as): array of rich-language rules. See rule tag infirewalld.zone(5).protocols(as): array of protocols, see protocol tag infirewalld.zone(5).source_ports(a(ss)): array of port and protocol pairs. See source-port tag infirewalld.zone(5).icmp_block_inversion(b): see icmp-block-inversion tag infirewalld.zone(5).forward(b): see forward tag infirewalld.zone(5).ingress-priority(i): see ingress-priority tag infirewalld.zone(5).egress-priority(i): see egress-priority tag infirewalld.zone(5).
Possible errors: INVALID_ZONE
setZoneSettings2(s: zone, a{sv}: settings, i: timeout)β Sets the runtime settings of the givenzone. For setting permanent settings seeorg.fedoraproject.FirewallD1.config.zone.Methods.update2.settingsis a dictionary indexed by keywords β types below, love. And to zero a value, pass an empty string or list (that's the trick, iykyk π₯).services(as): array of service names, see service tag infirewalld.zone(5).ports(a(ss)): array of port and protocol pairs. See port tag infirewalld.zone(5).icmp_blocks(as): array of icmp-blocks. See icmp-block tag infirewalld.zone(5).masquerade(b): see masquerade tag infirewalld.zone(5).forward_ports(a(ssss)): array of (port, protocol, to-port, to-addr). See forward-port tag infirewalld.zone(5).interfaces(as): array of interfaces. See interface tag infirewalld.zone(5).sources(as): array of source addresses. See source tag infirewalld.zone(5).rules_str(as): array of rich-language rules. See rule tag infirewalld.zone(5).protocols(as): array of protocols, see protocol tag infirewalld.zone(5).source_ports(a(ss)): array of port and protocol pairs. See source-port tag infirewalld.zone(5).icmp_block_inversion(b): see icmp-block-inversion tag infirewalld.zone(5).forward(b): see forward tag infirewalld.zone(5).
Possible errors: INVALID_ZONE
addForwardPort(s: zone, s: port, s: protocol, s: toport, s: toaddr, i: timeout) β sβ Adds the IPv4 forward port intozone. Ifzoneis empty, use the default zone (she's got you, don't worry π₯Ί). Theportcan either be a single port numberportidor a port rangeportid-portid. Theprotocolcan either betcporudp. The destination address is a simple IP address. Iftimeoutis non-zero, the operation will be active only for the amount of seconds β like a lil temporary slay β³ For permanent settings seeorg.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 blockicmpintozone. Theicmpis the one of the icmp types firewalld supports. To get a listing of supported icmp types useorg.fedoraproject.FirewallD1.Methods.listIcmpTypesπΈ Ifzoneis empty, use the default zone. Iftimeoutis non-zero, the operation will be active only for the amount of seconds. For permanent settings seeorg.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 tozone. Ifzoneis empty, use the default zone. For permanent settings seeorg.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 bindinterfacetozone, and from that point on literally all traffic going through that interface respects the zone's settings π«Ά- If
zoneis 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
- If
addMasquerade(s: zone, i: timeout)βsβ turns masquerade ON inzoneβ¨. Ifzoneis empty, default zone it is.- If
timeoutis 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
- If
addPort(s: zone, s: port, s: protocol, i: timeout)βsβ drops a port intozone. Emptyzoneβ default zone, as always πportcan be a single port number or a port range written likeportid-portid.protocolcan be eithertcporudp.- If
timeoutis 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 intozone. Emptyzoneβ default zone πΈprotocolcan be any protocol your system supports, so pls go peek at/etc/protocolsfor the supported ones π- If
timeoutis 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 intozoneπ- For the rich language rule syntax, please have a look at
firewalld.direct(5). - If
zoneis empty, use default zone. - If
timeoutis 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
- For the rich language rule syntax, please have a look at
addService(s: zone, s: service, i: timeout)βsβ adds a service intozoneπ- If
zoneis empty, use default zone. - If
timeoutis 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
- If
addSource(s: zone, s: source)βsβ binds asourcetozone, 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
zoneis 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 intozone. Emptyzoneβ default zone.portcan be a single port number or a port rangeportid-portid.protocolcan be eithertcporudp.- If
timeoutis 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 π« useorg.fedoraproject.FirewallD1.zone.Methods.changeZoneOfInterfaceinstead, fr fr.changeZoneOfInterface(s: zone, s: interface)βsβ moves an interface over tozone. Like, it's basicallyremoveInterface(interface)followed byaddInterface(zone, interface), that's the whole tea β- If
interfacehas not been bound to a zone before, it behaves likeaddInterface. - If
zoneis 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
- If
changeZoneOfSource(s: zone, s: source)βsβ same energy, but for a source. It's basicallyremoveSource(source)followed byaddSource(zone, source)π«- If
sourcehas not been bound to a zone before, it behaves likeaddSource. - If
zoneis 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
- If
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).
- The return value is a dictionary where keys are zone names (
getForwardPorts(s: zone)βaasβ returns the array of IPv4 forward ports previously added intozone. Emptyzoneβ 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 thatto-addrmight be empty in the case of local forwarding π«‘ - Possible errors:
INVALID_ZONE
- For getting permanent settings see
getIcmpBlocks(s: zone)βasβ returns the array of ICMP type (s) blocks previously added intozone. Emptyzoneβ default zone.- For getting permanent settings see
org.fedoraproject.FirewallD1.config.zone.Methods.getIcmpBlocks. - Possible errors:
INVALID_ZONE
- For getting permanent settings see
getIcmpBlockInversion(s: zone)βbβ returns whether ICMP block inversion was previously added tozone(yes/no, iconic boolean behaviour β¨). Emptyzoneβ default zone.- For getting permanent settings see
org.fedoraproject.FirewallD1.config.zone.Methods.getIcmpBlockInversion. - Possible errors:
INVALID_ZONE
- For getting permanent settings see
getInterfaces(s: zone)βasβ returns the array of interfaces (s) previously bound withzone. Emptyzoneβ default zone.- For getting permanent settings see
org.fedoraproject.FirewallD1.config.zone.Methods.getInterfaces. - Possible errors:
INVALID_ZONE
- For getting permanent settings see
getPorts(s: zone)βaasβ returns the array of ports (2-tuple of port and protocol) previously enabled inzone. Emptyzoneβ default zone.- For getting permanent settings see
org.fedoraproject.FirewallD1.config.zone.Methods.getPorts. - Possible errors:
INVALID_ZONE
- For getting permanent settings see
getProtocols(s: zone)βasβ returns the array of protocols (s) previously enabled inzone. Emptyzoneβ default zone.- For getting permanent settings see
org.fedoraproject.FirewallD1.config.zone.Methods.getProtocols. - Possible errors:
INVALID_ZONE
- For getting permanent settings see
getRichRules(s: zone)βasβ returns the array of rich language rules (s) previously added intozone. Emptyzoneβ default zone.- For getting permanent settings see
org.fedoraproject.FirewallD1.config.zone.Methods.getRichRules. - Possible errors:
INVALID_ZONE
- For getting permanent settings see
getServices(s: zone)βasβ returns the array of services (s) previously enabled inzone. Emptyzoneβ default zone.- For getting permanent settings see
org.fedoraproject.FirewallD1.config.zone.Methods.getServices. - Possible errors:
INVALID_ZONE
- For getting permanent settings see
getSourcePorts(s: zone)βaasβ returns the array of source ports (2-tuple of port and protocol) previously enabled inzone. Emptyzoneβ default zone.- For getting permanent settings see
org.fedoraproject.FirewallD1.config.zone.Methods.getSourcePorts. - Possible errors:
INVALID_ZONE
- For getting permanent settings see
getSources(s: zone)βasβ returns the array of sources (s) previously bound withzone. Emptyzoneβ default zone.- For getting permanent settings see
org.fedoraproject.FirewallD1.config.zone.Methods.getSources. - Possible errors:
INVALID_ZONE
- For getting permanent settings see
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.addZonehas been called recently, butfirewalldhas not been reloaded since then π
- For the list of zones known to the permanent environment see
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 atorg.fedoraproject.FirewallD1.config.zone.Methods.queryForwardPortπ- Possible errors:
INVALID_ZONE,INVALID_PORT,MISSING_PROTOCOL,INVALID_PROTOCOL,INVALID_ADDR,INVALID_FORWARD
- Possible errors:
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
- Possible errors:
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
- Possible errors:
queryInterface(s: zone, s: interface) β bβ asks whether interface has been bound to zone. Blank zone β default zone. For the permanent version seeorg.fedoraproject.FirewallD1.config.zone.Methods.queryInterface.- Possible errors:
INVALID_ZONE,INVALID_INTERFACE
- Possible errors:
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
- Possible errors:
queryPort(s: zone, s: port, s: protocol) β bβ returns whetherport/protocolhas been added in zone. Leave zone empty, get the default zone. Permanent vibes atorg.fedoraproject.FirewallD1.config.zone.Methods.queryPort.- Possible errors:
INVALID_ZONE,INVALID_PORT,MISSING_PROTOCOL,INVALID_PROTOCOL
- Possible errors:
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
- Possible errors:
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
- Possible errors:
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
- Possible errors:
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
- Possible errors:
querySourcePort(s: zone, s: port, s: protocol) β bβ returns whetherport/protocolhas 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
- Possible errors:
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β yeetsport/protocolout 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β removesport/protocolfrom 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 whenport/protocolhas been added to zone with timeout.PortRemoved(s: zone, s: port, s: protocol)β emitted whenport/protocolhas 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 whensource-port/protocolhas 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 retiredZoneOfInterfaceChanged(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 viaorg.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 inorg.fedoraproject.FirewallD1.config.Methods.listPolicies. ngl these two lists will have the same policies in most cases, but they can differ β for example iforg.fedoraproject.FirewallD1.config.Methods.addPolicygot 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 seeorg.fedoraproject.FirewallD1.config.policy.Methods.getSettings. The settings come as a dictionary indexed by keywords β for the possible keywords check outorg.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 toorg.fedoraproject.FirewallD1.config.policy.Methods.update. Settings are a dictionary indexed by keywords, and for the possible keywords seeorg.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 viaorg.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 πversion(s): see theversionattribute of theipsettag infirewalld.ipset(5).name(s): see theshorttag infirewalld.ipset(5).description(s): see thedescriptiontag infirewalld.ipset(5).type(s): see thetypeattribute of theipsettag infirewalld.ipset(5).options(a{ss}): dictionary of{option : value}. See theoptionstag infirewalld.ipset(5).entries(as): array of entries, see theentrytag infirewalld.ipset(5).
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 πversion(s): see theversionattribute of theicmptypetag infirewalld.icmptype(5).name(s): see theshorttag infirewalld.icmptype(5).description(s): see thedescriptiontag infirewalld.icmptype(5).destinations(as): an array, either empty or holding the strings'ipv4'or'ipv6', see thedestinationtag infirewalld.icmptype(5).
Possible errors: NAME_CONFLICT, INVALID_NAME, INVALID_TYPE
addService(s: service, (sssa(ss)asa{ss}asa(ss)): settings) β oβ this function is deprecated π ββοΈ useorg.fedoraproject.FirewallD1.config.Methods.addService2instead. she's old news bestieaddService2s: 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 πversion(s): see theversionattribute of theservicetag infirewalld.service(5).name(s): see theshorttag infirewalld.service(5).description(s): see thedescriptiontag infirewalld.service(5).ports(a(ss)): array of port and protocol pairs. See theporttag infirewalld.service(5).module names(as): array of kernel netfilter helpers, see themoduletag infirewalld.service(5).destinations(a{ss}): dictionary of{IP family : IP address}where the'IP family'key is either'ipv4'or'ipv6'. See thedestinationtag infirewalld.service(5).protocols(as): array of protocols, see theprotocoltag infirewalld.service(5).source_ports(a(ss)): array of port and protocol pairs. See thesource-porttag infirewalld.service(5).includes(as): array of service includes, see theincludetag infirewalld.service(5).helpers(as): array of service helpers, see thehelpertag infirewalld.service(5).
Possible errors: NAME_CONFLICT, INVALID_NAME, INVALID_TYPE
addZone(s: zone, (sssbsasa(ss)asba(ssss)asasasasa(ss)b): settings) β oβ deprecated alert π¨ useorg.fedoraproject.FirewallD1.config.Methods.addZone2insteadaddZone2(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 πversion(s): see theversionattribute of thezonetag infirewalld.zone(5).name(s): see theshorttag infirewalld.zone(5).description(s): see thedescriptiontag infirewalld.zone(5).target(s): see thetargetattribute of thezonetag infirewalld.zone(5).services(as): array of service names, see theservicetag infirewalld.zone(5).ports(a(ss)): array of port and protocol pairs. See theporttag infirewalld.zone(5).icmp_blocks(as): array of icmp-blocks. See theicmp-blocktag infirewalld.zone(5).masquerade(b): see themasqueradetag infirewalld.zone(5).forward_ports(a(ssss)): array of (port, protocol, to-port, to-addr). See theforward-porttag infirewalld.zone(5).interfaces(as): array of interfaces. See theinterfacetag infirewalld.zone(5).sources(as): array of source addresses. See thesourcetag infirewalld.zone(5).rules_str(as): array of rich-language rules. See theruletag infirewalld.zone(5).protocols(as): array of protocols, see theprotocoltag infirewalld.zone(5).source_ports(a(ss)): array of port and protocol pairs. See thesource-porttag infirewalld.zone(5).icmp_block_inversion(b): see theicmp-block-inversiontag infirewalld.zone(5).forward(b): see theforwardtag infirewalld.zone(5).ingress_priority(i): see theingress-prioritytag infirewalld.zone(5).egress_priority(i): see theegress-prioritytag infirewalld.zone(5).
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 π«Άdescription(s): see thedescriptiontag infirewalld.policy(5).egress_zones(as): array of zone names. See theegress-zonetag infirewalld.policy(5).forward_ports(a(ssss)): array of (port, protocol, to-port, to-addr). See theforward-porttag infirewalld.policy(5).icmp_blocks(as): array of icmp-blocks. See theicmp-blocktag infirewalld.policy(5).ingress_zones(as): array of zone names. See theingress-zonetag infirewalld.policy(5).masquerade(b): see themasqueradetag infirewalld.policy(5).ports(a(ss)): array of port and protocol pairs. See theporttag infirewalld.policy(5).priority(i): see theprioritytag infirewalld.policy(5).protocols(as): array of protocols, see theprotocoltag infirewalld.policy(5).rich_rules(as): array of rich-language rules. See theruletag infirewalld.policy(5).services(as): array of service names, see theservicetag infirewalld.policy(5).short(s): see theshorttag infirewalld.policy(5).source_ports(a(ss)): array of port and protocol pairs. See thesource-porttag infirewalld.policy(5).target(s): see thetargetattribute of thepolicytag infirewalld.policy(5).version(s): see theversionattribute of thepolicytag infirewalld.policy(5).
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
- Possible errors:
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
- Possible errors:
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
- Possible errors:
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
- Possible errors:
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
- Possible errors:
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'sorg.fedoraproject.FirewallD1.Methods.getHelpers, different girl entirely.listIPSets() β aoβ array of object paths (o) of every ipset in permanent configuration. For the runtime lineup seeorg.fedoraproject.FirewallD1.ipset.Methods.getIPSets.listIcmpTypes() β aoβ array of object paths (o) of the icmp types in permanent configuration. Runtime version lives atorg.fedoraproject.FirewallD1.Methods.listIcmpTypes.listServices() β aoβ array of object paths (o) of the services in permanent configuration. Runtime flex isorg.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 seeorg.fedoraproject.FirewallD1.zone.Methods.getZones. And bestie, listen: those two lists are gonna match in most cases, but they can differ β like iforg.fedoraproject.FirewallD1.config.Methods.addZonewas 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 atorg.fedoraproject.FirewallD1.policy.Methods.getPolicies. Again: usually identical, but they can drift β for example iforg.fedoraproject.FirewallD1.config.Methods.addPolicygot 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 toyesortrueand 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 tonoorfalseand 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 isnftables.
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 atorg.fedoraproject.FirewallD1.config.Properties.IPv6_rpfilter2instead, 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-restorecalls 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) β whenLogDeniedis enabled, logging rules get added right before the reject and drop rules in theINPUT,FORWARDandOUTPUTchains for the default rules, and also the final reject and drop rules in zones. Possible values are:all,unicast,broadcast,multicastandoff. π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 toyesand 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 tonoand 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 toyesand every nftables rule gets a counter. Super useful for debugging, comes with a small performance cost. worth it imo.NftablesTableOwnerβsβ (rw) β set it toyesand 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 eitheripv4(iptables) oripv6(ip6tables) oreb(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 theINPUT_directchain. These chains are jumped into before chains for zones, i.e. every rule put intoINPUT_directgets checked before rules in zones. For runtime operation seeorg.fedoraproject.FirewallD1.direct.Methods.addChain.- Possible errors:
INVALID_IPV,INVALID_TABLE,ALREADY_ENABLED
- Possible errors:
addPassthrough(s: ipv, as: args) β Nothingβ add a passthrough rule with the arguments args for ipv being eitheripv4(iptables) oripv6(ip6tables) oreb(ebtables). For runtime operation seeorg.fedoraproject.FirewallD1.direct.Methods.addPassthrough.- Possible errors:
INVALID_IPV,ALREADY_ENABLED
- Possible errors:
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 eitheripv4(iptables) oripv6(ip6tables) oreb(ebtables). The priority orders the rules. Priority0means 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 seeorg.fedoraproject.FirewallD1.direct.Methods.addRule. β¨- Possible errors:
INVALID_IPV,INVALID_TABLE,ALREADY_ENABLED
- Possible errors:
getAllChains() β a(sss)β get all chains added to all tables, in the format:ipv,table,chain. This only concerns chains previously added withaddChain. Return value is an array of (ipv,table,chain). For runtime operation seeorg.fedoraproject.FirewallD1.direct.Methods.getAllChains.- ipv (
s): eitheripv4(iptables) oripv6(ip6tables) oreb(ebtables). - table (
s): one offilter,mangle,nat,raw,security - chain (
s): name of a chain.
- ipv (
getAllPassthroughs() β a(sas)β get all passthrough rules added in all ipv types, in the format:ipv,rule. This only concerns rules previously added withaddPassthrough. Return value is an array of (ipv, array of arguments). For runtime operation seeorg.fedoraproject.FirewallD1.direct.Methods.getAllPassthroughs. π«Ά- ipv (
s): eitheripv4(iptables) oripv6(ip6tables) oreb(ebtables).
- ipv (
arguments(as) β an array of commands, parameters, and alllll the otheriptables/ip6tables/ebtablescommand 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 otheriptables/ip6tables/ebtablescommand 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 otheriptables/ip6tables/ebtablescommand 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' infirewalld.direct(5).rules(a(sssias)) β array of (ipv,table,chain,priority, array ofarguments), see 'rule' infirewalld.direct(5).passthroughs(a(sas)) β array of (ipv, array ofarguments), see passthrough infirewalld.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' infirewalld.direct(5).rules(a(sssias)) β array of (ipv,table,chain,priority, array ofarguments), see 'rule' infirewalld.direct(5).passthroughs(a(sas)) β array of (ipv, array ofarguments), see passthrough infirewalld.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. π
version(s) β see theversionattribute of theipsettag infirewalld.ipset(5).name(s) β see theshorttag infirewalld.ipset(5).description(s) β see thedescriptiontag infirewalld.ipset(5).type(s) β see thetypeattribute of theipsettag infirewalld.ipset(5).options(a{ss}) β dictionary of{option : value}. see theoptionstag infirewalld.ipset(5).entries(as) β array of entries, see theentrytag infirewalld.ipset(5).
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 πΎ). Theshorttag lives infirewalld.ipset(5).setType(s: ipset_type) β Nothingβ permanently sets the type of the ipset to ipset_type. Peep thetypeattribute of theipsettag infirewalld.ipset(5).setVersion(s: version) β Nothingβ permanently sets the version of the ipset to version. It's theversionattribute of theipsettag infirewalld.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:- version (
s): theversionattribute of theipsettag infirewalld.ipset(5). β¨ - name (
s): theshorttag infirewalld.ipset(5). - description (
s): thedescriptiontag infirewalld.ipset(5). - type (
s): thetypeattribute of theipsettag infirewalld.ipset(5). - options (
a{ss}): a dictionary of{option : value}. See theoptionstag infirewalld.ipset(5). - entries (
as): an array of entries, see theentrytag infirewalld.ipset(5).
- version (
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) βTrueif the ipset is build-in,falseotherwise. Born with it, no cap.defaultβbβ (ro) βTrueif the build-in ipset has its default settings.Falseif it's been modified. And it's alwaysFalsefor ipsets that aren't build-in. Periodt.filenameβsβ (ro) β the name (including the.xmlextension πΎ) 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/ipsetsor/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 theforward-porttag infirewalld.zone(5). Want the runtime version instead? That'sorg.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 theicmp-blocktag infirewalld.zone(5). Runtime girlies wantorg.fedoraproject.FirewallD1.zone.Methods.addIcmpBlock.
Possible errors: ALREADY_ENABLED π
addIcmpBlock(s: icmptype) β Nothingβ permanently adds icmp block inversion to the zone. See theicmp-block-inversiontag infirewalld.zone(5). For the runtime operation peeporg.fedoraproject.FirewallD1.zone.Methods.addIcmpBlockInversion.
Possible errors: ALREADY_ENABLED π
Not me noticing the page lists this under the same signature asaddIcmpBlockπ β the description is lowkey about inversion and the runtime sibling isaddIcmpBlockInversion. 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 theinterfacetag infirewalld.zone(5). Runtime vibes:org.fedoraproject.FirewallD1.zone.Methods.addInterface.
Possible errors: ALREADY_ENABLED π
addMasquerade() β Nothingβ permanently enables masquerading in the zone. See themasqueradetag infirewalld.zone(5). Runtime operation lives atorg.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 theporttag infirewalld.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/protocolsfor 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 theruletag infirewalld.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 theservicetag infirewalld.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 thesourcetag infirewalld.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 thesource-porttag infirewalld.zone(5). For runtime operation seeorg.fedoraproject.FirewallD1.zone.Methods.addSourcePort.
Possible errors: ALREADY_ENABLED π
getDescription() β sβ gets the description of the zone. See thedescriptiontag infirewalld.zone(5).getForwardPorts() β a(ssss)β gets the list of(port, protocol, toport, toaddr)defined in the zone. See theforward-porttag infirewalld.zone(5). Runtime operation:org.fedoraproject.FirewallD1.zone.Methods.getForwardPorts.getIcmpBlockInversion() β bβ gets the icmp block inversion flag of the zone. See theicmp-block-inversiontag infirewalld.zone(5).getIcmpBlocks() β asβ gets the list of icmp type names blocked in the zone. See theicmp-blocktag infirewalld.zone(5). Runtime:org.fedoraproject.FirewallD1.zone.Methods.getIcmpBlocks.getInterfaces() β asβ gets the list of interfaces bound to the zone. See theinterfacetag infirewalld.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 thequeryMasquerade()method. See themasqueradetag infirewalld.zone(5).getPorts() β a(ss)β gets the list of(port, protocol)defined in the zone. See theporttag infirewalld.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? Peeporg.fedoraproject.FirewallD1.zone.Methods.getProtocols.getRichRules() β asβ gets the list of rich-language rules in the zone. See theruletag infirewalld.zone(5). Runtime:org.fedoraproject.FirewallD1.zone.Methods.getRichRules.getServices() β asβ gets the list of service names used in the zone. See theservicetag infirewalld.zone(5). Runtime:org.fedoraproject.FirewallD1.zone.Methods.getServices.getSettings() β (sssbsasa(ss)asba(ssss)asasasasa(ss)b)β π¨ this function is deprecated, so useorg.fedoraproject.FirewallD1.config.zone.Methods.getSettings2instead, fr fr.getSettings2() β a{sv}β returns the permanent settings of the given zone. For the runtime settings, go seeorg.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.version(s): theversionattribute of thezonetag infirewalld.zone(5). β¨name(s): theshorttag infirewalld.zone(5).description(s): thedescriptiontag infirewalld.zone(5).target(s): thetargetattribute of thezonetag infirewalld.zone(5).services(as): array of service names, see theservicetag infirewalld.zone(5).ports(a(ss)): array of port and protocol pairs. See theporttag infirewalld.zone(5).icmp_blocks(as): array of icmp-blocks. See theicmp-blocktag infirewalld.zone(5).masquerade(b): see themasqueradetag infirewalld.zone(5).forward_ports(a(ssss)): array of(port, protocol, to-port, to-addr). See theforward-porttag infirewalld.zone(5).interfaces(as): array of interfaces. See theinterfacetag infirewalld.zone(5).sources(as): array of source addresses. See thesourcetag infirewalld.zone(5).rules_str(as): array of rich-language rules. See theruletag infirewalld.zone(5).protocols(as): array of protocols, see theprotocoltag infirewalld.zone(5).source_ports(a(ss)): array of port and protocol pairs. See thesource-porttag infirewalld.zone(5).icmp_block_inversion(b): see theicmp-block-inversiontag infirewalld.zone(5).forward(b): see theforwardtag infirewalld.zone(5).ingress_priority(i): see theingress-prioritytag infirewalld.zone(5).egress_priority(i): see theegress-prioritytag infirewalld.zone(5).
getShort() β sβ gets the name of the zone. See theshorttag infirewalld.zone(5).getSourcePorts() β a(ss)β gets the list of(port, protocol)defined in the zone. See thesource-porttag infirewalld.zone(5). Runtime:org.fedoraproject.FirewallD1.zone.Methods.getSourcePorts.getSources() β asβ gets the list of source addresses bound to the zone. See thesourcetag infirewalld.zone(5). Runtime:org.fedoraproject.FirewallD1.zone.Methods.getSources.getTarget() β sβ gets the target of the zone. See thetargetattribute of thezonetag infirewalld.zone(5).getVersion() β sβ gets the version of the zone. See theversionattribute of thezonetag infirewalld.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 theforward-porttag infirewalld.zone(5). Wanna do it at runtime instead? That'sorg.fedoraproject.FirewallD1.zone.Methods.queryForwardPort. πqueryIcmpBlock(s: icmptype) β bβ isicmptypechillin' in the zone's list of blocked icmp types? See theicmp-blocktag infirewalld.zone(5). Runtime version:org.fedoraproject.FirewallD1.zone.Methods.queryIcmpBlock.queryIcmpBlockInversion() β bβ tell me, is icmp block inversion enabled in this zone? π See theicmp-block-inversiontag infirewalld.zone(5). For runtime:org.fedoraproject.FirewallD1.zone.Methods.queryIcmpBlockInversion.queryInterface(s: interface) β bβ isinterfaceone of the interfaces bound to this zone? See theinterfacetag infirewalld.zone(5). Runtime:org.fedoraproject.FirewallD1.zone.Methods.queryInterface.queryMasquerade() β bβ is masquerade enabled in this zone? lowkey the exact same thing asgetMasquerade(), no cap. See themasqueradetag infirewalld.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 theporttag infirewalld.zone(5). Runtime:org.fedoraproject.FirewallD1.zone.Methods.queryPort.queryProtocol(s: protocol) β bβ hasprotocolbeen added to the zone? Runtime version lives atorg.fedoraproject.FirewallD1.zone.Methods.queryProtocol.
Possible errors: INVALID_PROTOCOL π
queryRichRule(s: rule) β bβ isrulehanging out in the zone's list of rich-language rules? See theruletag infirewalld.zone(5). Runtime:org.fedoraproject.FirewallD1.zone.Methods.queryRichRule.queryService(s: service) β bβ isservicein the zone's service list? See theservicetag infirewalld.zone(5). Runtime:org.fedoraproject.FirewallD1.zone.Methods.queryService.querySource(s: source) β bβ issourceone of the source addresses bound to this zone? See thesourcetag infirewalld.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 thesource-porttag infirewalld.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 theforward-porttag infirewalld.zone(5). Runtime:org.fedoraproject.FirewallD1.zone.Methods.removeForwardPort.
Possible errors: NOT_ENABLED
removeIcmpBlock(s: icmptype) β Nothingβ permanently removesicmptypefrom the zone's blocked icmp types list. See theicmp-blocktag infirewalld.zone(5). Runtime:org.fedoraproject.FirewallD1.zone.Methods.removeIcmpBlock.
Possible errors: NOT_ENABLED
removeIcmpBlockInversion() β Nothingβ permanently removes icmp block inversion from the zone. β¨ See theicmp-block-inversiontag infirewalld.zone(5). Runtime:org.fedoraproject.FirewallD1.zone.Methods.removeIcmpBlockInversion.
Possible errors: NOT_ENABLED
removeInterface(s: interface) β Nothingβ permanently unbindsinterfacefrom the zone's interface list. See theinterfacetag infirewalld.zone(5). Runtime:org.fedoraproject.FirewallD1.zone.Methods.removeInterface.
Possible errors: NOT_ENABLED
removeMasquerade() β Nothingβ permanently disables masquerading in the zone. See themasqueradetag infirewalld.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 theporttag infirewalld.zone(5). Runtime:org.fedoraproject.FirewallD1.zone.Methods.removePort.
Possible errors: NOT_ENABLED
removeProtocol(s: protocol) β Nothingβ permanently removesprotocolfrom the zone. Runtime:org.fedoraproject.FirewallD1.zone.Methods.removeProtocol.
Possible errors:INVALID_PROTOCOL,NOT_ENABLED
removeRichRule(s: rule) β Nothingβ permanently removesrulefrom the zone's rich-language rules. π See theruletag infirewalld.zone(5). Runtime:org.fedoraproject.FirewallD1.zone.Methods.removeRichRule.
Possible errors: NOT_ENABLED
removeService(s: service) β Nothingβ permanently removesservicefrom the zone's service list. See theservicetag infirewalld.zone(5). Runtime:org.fedoraproject.FirewallD1.zone.Methods.removeService.
Possible errors: NOT_ENABLED
removeSource(s: source) β Nothingβ permanently removessourcefrom the source addresses bound to the zone. See thesourcetag infirewalld.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 thesource-porttag infirewalld.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 toname. 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 todescription. See thedescriptiontag infirewalld.zone(5).setForwardPorts(a(ssss): ports) β Nothingβ permanently sets the zone's forward ports to the list of(port, protocol, toport, toaddr). See theforward-porttag infirewalld.zone(5).setIcmpBlockInversion(b: flag) β Nothingβ permanently sets the zone's icmp block inversion flag toflag. See theicmp-block-inversiontag infirewalld.zone(5).setIcmpBlocks(as: icmptypes) β Nothingβ permanently sets the zone's blocked icmp types list toicmptypes. See theicmp-blocktag infirewalld.zone(5).setInterfaces(as: interfaces) β Nothingβ permanently sets the interfaces bound to the zone tointerfaces. See theinterfacetag infirewalld.zone(5).setMasquerade(b: masquerade) β Nothingβ permanently sets masquerading in the zone tomasquerade. See themasqueradetag infirewalld.zone(5).setPorts(a(ss): ports) β Nothingβ permanently sets the zone's ports to the list of(port, protocol). See theporttag infirewalld.zone(5).setProtocols(as: protocols) β Nothingβ permanently sets the zone's protocol list toprotocols. See theprotocoltag infirewalld.zone(5).setRichRules(as: rules) β Nothingβ permanently sets the rich-language rules list torules. See theruletag infirewalld.zone(5).setServices(as: services) β Nothingβ permanently sets the zone's service list toservices. See theservicetag infirewalld.zone(5).setShort(s: short) β Nothingβ permanently sets the zone's name toshort. See theshorttag infirewalld.zone(5).setSourcePorts(a(ss): ports) β Nothingβ permanently sets the zone's source-ports to the list of(port, protocol). See thesource-porttag infirewalld.zone(5).setSources(as: sources) β Nothingβ permanently sets the source addresses bound to the zone tosources. See thesourcetag infirewalld.zone(5).setTarget(s: target) β Nothingβ permanently sets the zone's target totarget. See thetargetattribute of thezonetag infirewalld.zone(5).setVersion(s: version) β Nothingβ permanently sets the zone's version toversion. See theversionattribute of thezonetag infirewalld.zone(5).
update((sssbsasa(ss)asba(ssss)asasasasa(ss)b): settings) β Nothingβ β οΈ deprecated alert β οΈ bestie, do not use this one. Useorg.fedoraproject.FirewallD1.config.zone.Methods.update2instead. It's giving legacy. πupdate2(a{sv}: settings) β Nothingβ updates the zone's settings tosettings.settingsis 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.version(s): see theversionattribute of thezonetag infirewalld.zone(5).name(s): see theshorttag infirewalld.zone(5).description(s): see thedescriptiontag infirewalld.zone(5).target(s): see thetargetattribute of thezonetag infirewalld.zone(5).services(as): array of service names, see theservicetag infirewalld.zone(5).ports(a(ss)): array of port and protocol pairs. See theporttag infirewalld.zone(5).icmp_blocks(as): array of icmp-blocks. See theicmp-blocktag infirewalld.zone(5).masquerade(b): see themasqueradetag infirewalld.zone(5).forward_ports(a(ssss)): array of(port, protocol, to-port, to-addr). See theforward-porttag infirewalld.zone(5).interfaces(as): array of interfaces. See theinterfacetag infirewalld.zone(5).sources(as): array of source addresses. See thesourcetag infirewalld.zone(5).rules_str(as): array of rich-language rules. See theruletag infirewalld.zone(5).protocols(as): array of protocols, see theprotocoltag infirewalld.zone(5).source_ports(a(ss)): array of port and protocol pairs. See thesource-porttag infirewalld.zone(5).icmp_block_inversion(b): see theicmp-block-inversiontag infirewalld.zone(5).
okay that was a whole lot of methods, are you still with me bestie?? π«Ά
forward(b) β same energy as theforwardtag infirewalld.zone(5)β¨ingress_priority(i) β literally theingress-prioritytag fromfirewalld.zone(5), bestie πegress_priority(i) β yep, that's theegress-prioritytag infirewalld.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) βTrueif the zone is build-in, otherwiseFalse. That's it, that's the whole vibe.defaultβ b β (ro) βTrueif a build-in zone is still rocking its default settings,Falseif it's been modified. And for any zone that is not build-in? AlwaysFalse, no exceptions, periodt.filenameβ s β (ro) β the name of the file where the config lives,.xmlextension 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/zonesor/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 peeporg.fedoraproject.FirewallD1.policy.Methods.getPolicySettings. The settings come back as a dictionary indexed by keywords, and for the full list of possible keywords checkorg.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 seeorg.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) βTrueif the policy is build-in,Falseotherwise.defaultβ b β (ro) βTrueif a build-in policy still has its default settings,Falseif it's been modified. AlwaysFalsefor policies that aren't build-in. No notes. πfilenameβ s β (ro) β name of the file where the configuration is stored,.xmlextension 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/policiesor/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 theupdate2()method instead πaddPort(s: port, s: protocol)βNothingβ permanently adds the(port, protocol)pair to the list of ports in the service. See theporttag infirewalld.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/protocolsfor the supported ones. See theprotocoltag infirewalld.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 thesource-porttag infirewalld.service(5)π«
Possible errors: ALREADY_ENABLED
getDescription()βsβ gets the description of the service. See thedescriptiontag infirewalld.service(5)πgetDestination(s: family)βsβ gets the destination for the IP family, which is either'ipv4'or'ipv6'. See thedestinationtag infirewalld.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 thedestinationtag infirewalld.service(5)πΊοΈgetModules()βasβ yeahhh this one's deprecated too. Please use"helpers"in thegetSettings2()method instead πgetPorts()βa(ss)β gets the list of(port, protocol)pairs defined in the service. See theporttag infirewalld.service(5)πgetProtocols()βasβ returns an array of protocols (s) defined in the service. See theprotocoltag infirewalld.service(5)πgetSettings()β(sssa(ss)asa{ss}asa(ss))β girl, this function is deprecated, useorg.fedoraproject.FirewallD1.config.service.Methods.getSettings2instead πgetSettings2(s: service)βs{sv}β returns the runtime settings of the given service. For getting runtime settings seeorg.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 πversion(s) β see theversionattribute of theservicetag infirewalld.service(5).name(s) β see theshorttag infirewalld.service(5).description(s) β see thedescriptiontag infirewalld.service(5).ports(a(ss)) β array of port and protocol pairs. See theporttag infirewalld.service(5).module names(as) β array of kernel netfilter helpers, see themoduletag infirewalld.service(5).destinations(a{ss}) β dictionary of{IP family : IP address}where the'IP family'key can be either'ipv4'or'ipv6'. See thedestinationtag infirewalld.service(5).protocols(as) β array of protocols, see theprotocoltag infirewalld.service(5).source_ports(a(ss)) β array of port and protocol pairs. See thesource-porttag infirewalld.service(5).includes(as) β array of service includes, see theincludetag infirewalld.service(5).helpers(as) β array of service helpers, see thehelpertag infirewalld.service(5).
getShort()βsβ gets the name of the service. See theshorttag infirewalld.service(5)π·οΈgetSourcePorts()βa(ss)β gets the list of(port, protocol)pairs defined in the service. See thesource-porttag infirewalld.service(5)β¨getVersion()βsβ gets the version of the service. See theversionattribute of theservicetag infirewalld.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 thedestinationtag infirewalld.service(5)πqueryModule(s: module)βbβ this method is deprecated. Please use"helpers"in thegetSettings2()method πqueryPort(s: port, s: protocol)βbβ returns whether(port, protocol)is in the list of ports in the service. See theporttag infirewalld.service(5)πqueryProtocol(s: protocol)βbβ returns whether protocol is in the list of protocols in the service. See theprotocoltag infirewalld.service(5)πquerySourcePort(s: port, s: protocol)βbβ returns whether(port, protocol)is in the list of source ports in the service. See thesource-porttag infirewalld.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 thedestinationtag infirewalld.service(5)π«
Possible errors: NOT_ENABLED
removeModule(s: module)βNothingβ deprecated, bestie. Please use"helpers"in theupdate2()method πremovePort(s: port, s: protocol)βNothingβ permanently removes(port, protocol)from the list of ports in the service. See theporttag infirewalld.service(5)βοΈ
Possible errors: NOT_ENABLED
removeProtocol(s: protocol)βNothingβ permanently removes protocol from the list of protocols in the service. See theprotocoltag infirewalld.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 thesource-porttag infirewalld.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 thedescriptiontag infirewalld.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 thedestinationtag infirewalld.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 thedestinationtag infirewalld.service(5)πΊοΈsetModules(as: modules)βNothingβ deprecated (again π). Please use"helpers"in theupdate2()method πsetPorts(a(ss): ports)βNothingβ permanently sets the ports of the service to the list of(port, protocol)pairs. See theporttag infirewalld.service(5)πsetProtocols(as: protocols)βNothingβ permanently sets the protocols of the service to the list of protocols. See theprotocoltag infirewalld.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 theshorttag infirewalld.service(5).setSourcePorts(a(ss): ports) β Nothingβ permanently sets the service's source-ports to your list of(port, protocol)pairs. that's thesource-porttag infirewalld.service(5), iykyk πΈsetVersion(s: version) β Nothingβ permanently sets the service's version to version. yeah it's theversionattribute of theservicetag infirewalld.service(5)β¨update((sssa(ss)asa{ss}asa(ss)): settings) β Nothingβ okay bestie this one is DEPRECATED π do not use it, useorg.fedoraproject.FirewallD1.config.service.Methods.update2instead. 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.version(s): see theversionattribute of theservicetag infirewalld.service(5).name(s): see theshorttag infirewalld.service(5).description(s): see thedescriptiontag infirewalld.service(5).ports(a(ss)): array of port and protocol pairs. see theporttag infirewalld.service(5).modulenames (as): array of kernel netfilter helpers, see themoduletag infirewalld.service(5).destinations(a{ss}): dictionary of{IP family : IP address}where the'IP family'key can be either'ipv4'or'ipv6'. see thedestinationtag infirewalld.service(5).protocols(as): array of protocols, see theprotocoltag infirewalld.service(5).source_ports(a(ss)): array of port and protocol pairs. see thesource-porttag infirewalld.service(5).includes(as): array of service includes, see theincludetag infirewalld.service(5).helpers(as): array of service helpers, see thehelpertag infirewalld.service(5).
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 nameUpdated(s: name)β fired off when the service named name has been updated β¨
Properties π
builtin-b- (ro) βTrueif the service is build-in,falseelse.default-b- (ro) βTrueif the build-in service has default settings.Falseif it's been modified. alwaysFalsefor services that are not build-in.filename-s- (ro) β name (including the.xmlextension) 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/servicesor/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 theporttag infirewalld.helper(5).
possible errors: ALREADY_ENABLED β it's already there bestie, we been knew π
getDescription() β sβ gets the description of the helper. see thedescriptiontag infirewalld.helper(5).getFamily() β sβ gets the family, which is'ipv4','ipv6', or empty for both. see thefamilytag infirewalld.helper(5).getModule() β sβ gets the modules (netfilter kernel helpers) used in the helper. see themoduletag infirewalld.helper(5).getPorts() β a(ss)β gets the list of(port, protocol)defined in the helper. see theporttag infirewalld.helper(5).getSettings() β (sssssa(ss))β returns the permanent settings of a helper. if you want the runtime settings, look atorg.fedoraproject.FirewallD1.Methods.getHelperSettingsinstead. the settings come in this format: version, name, description, family, module, array of ports (port, protocol) πversion(s): see theversionattribute of thehelpertag infirewalld.helper(5).name(s): see theshorttag infirewalld.helper(5).description(s): see thedescriptiontag infirewalld.helper(5).family(s): see thefamilytag infirewalld.helper(5).module(s): see themoduletag infirewalld.helper(5).ports(a(ss)): array of port and protocol pairs. see theporttag infirewalld.helper(5).
getShort() β sβ gets the name of the helper. see theshorttag infirewalld.helper(5).getVersion() β sβ gets the version of the helper. see theversionattribute of thehelpertag infirewalld.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 thefamilytag infirewalld.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 themoduletag infirewalld.helper(5).queryPort(s: port, s: protocol) β bβ returns whether(port, protocol)is in the list of ports in the helper. see theporttag infirewalld.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 theporttag infirewalld.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 thedescriptiontag infirewalld.helper(5).setFamily(s: family) β Nothingβ permanently sets the family of the helper to family. see thefamilytag infirewalld.helper(5).setModule(s: module) β Nothingβ permanently sets the module of the helper to description. see themoduletag infirewalld.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 theporttag infirewalld.helper(5).setShort(s: short) β Nothingβ permanently sets the name of the helper to short. see theshorttag infirewalld.helper(5).setVersion(s: version) β Nothingβ permanently sets the version of the helper to version. see theversionattribute of thehelpertag infirewalld.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. π§version(s): see theversionattribute of thehelpertag infirewalld.helper(5).name(s): see theshorttag infirewalld.helper(5).description(s): see thedescriptiontag infirewalld.helper(5).family(s): see thefamilytag infirewalld.helper(5).module(s): see themoduletag infirewalld.helper(5).ports(a(ss)): array of port and protocol pairs. see theporttag infirewalld.helper(5).
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 nameUpdated(s: name)β fired off when the helper named name has been updated β¨
Properties π
builtin-b- (ro) βTrueif the helper is build-in,falseelse.default-b- (ro) βTrueif the build-in helper has default settings.Falseif it's been modified. alwaysFalsefor helpers that are not build-in.filename-s- (ro) β name (including the.xmlextension) 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/helpersor/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 thedestinationtag infirewalld.icmptype(5).
possible errors: ALREADY_ENABLED π
getDescription() β sβ gets the description of the icmp type. see thedescriptiontag infirewalld.icmptype(5).getDestinations() β asβ gets the list of destinations. see thedestinationtag infirewalld.icmptype(5).getSettings() β (sssas)β returns the permanent settings of the icmp type. for the runtime settings, hit uporg.fedoraproject.FirewallD1.Methods.getIcmpTypeSettingsinstead. the settings are in this format: version, name, description, array of destinations πversion(s): see theversionattribute of theicmptypetag infirewalld.icmptype(5).name(s): see theshorttag infirewalld.icmptype(5).description(s): see thedescriptiontag infirewalld.icmptype(5).destinations(as): array, either empty or containing the strings'ipv4'and/or'ipv6', see thedestinationtag infirewalld.icmptype(5).
getShort() β sβ gets the name of the icmp type. see theshorttag infirewalld.icmptype(5).getVersion() β sβ gets the version of the icmp type. see theversionattribute of theicmptypetag infirewalld.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 thedestinationtag infirewalld.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 thedestinationtag infirewalld.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 thedescriptiontag infirewalld.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:
version(s): see theversionattribute of theicmptypetag infirewalld.icmptype(5).name(s): see theshorttag infirewalld.icmptype(5).description(s): see thedescriptiontag infirewalld.icmptype(5).destinations(as): an array, either empty or containing the strings'ipv4'and/or'ipv6', see thedestinationtag infirewalld.icmptype(5).
β¨ 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.xmlextension) 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/icmptypesor/etc/firewalld/icmptypes. Two options, both iconic, pick your lane π
π SEE ALSO π
The whole friend group, go say hi to all of them:
firewall-applet(1)firewalld(1)firewall-cmd(1)firewall-config(1)firewalld.conf(5)firewalld.direct(5)firewalld.dbus(5)firewalld.icmptype(5)firewall-offline-cmd(1)firewalld.richlanguage(5)firewalld.service(5)firewalld.zone(5)firewalld.zones(5)firewalld.policy(5)firewalld.policies(5)firewalld.ipset(5)firewalld.helper(5)
π NOTES π
firewalld home page, 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 isfirewalldversion 2.5.2, and the page itself isFIREWALLD.DBUS(5). Go forth and talk to D-Bus like the icon you are π ππ¦
π¦ where this page comes from
- arch rolling: firewalld 2.5.2-1 Β· GPL-2.0-or-later
- nixpkgs unstable: firewalld 2.5.2
- ubuntu stonking: firewalld 2.5.2-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms