firewalld.dbus
Name
firewalld.dbus — firewalld D-Bus interface description
Object Paths
This is the basic firewalld object path structure. The used interfaces are explained below 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 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 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 interface contains general runtime operations, like: reloading, panic mode, default zone handling, getting services and icmp types and their settings.Methods
authorizeAll
() → NothingInitiate authorization for the complete firewalld D-Bus interface. This method it mostly useful for configuration applications.
completeReload
() → NothingReload firewall completely, even netfilter kernel modules. This will most likely terminate active connections, because state information is lost. This option should only be used in case of severe firewall problems. For example if there are state information problems that no connection can be established with correct firewall rules.
disablePanicMode
() → NothingDisable panic mode. After disabling panic mode established connections might work again, if panic mode was enabled for a short period of time.
Possible errors: NOT_ENABLED, COMMAND_FAILED
enablePanicMode
() → NothingEnable panic mode. All incoming and outgoing packets are dropped, active connections will expire. Enable this only if there are serious problems with your network environment.
Possible errors: ALREADY_ENABLED, COMMAND_FAILED
getAutomaticHelpers
() → sDeprecated. This always returns "no".
getDefaultZone
() → sReturn default zone.
getHelperSettings
(s:helper
) → (sssssa(ss))Return runtime settings of given
helper
. For getting permanent settings see org.fedoraproject.FirewallD1.config.helper.Methods.getSettings. Settings are in format:version
,name
,description
,family
,module
and array ofports
.
version (s)
: seeversion
attribute ofhelper
tag in firewalld.helper(5).name (s)
: seeshort
tag in firewalld.helper(5).description (s)
: seedescription
tag in firewalld.helper(5).family (s)
: seefamily
tag in firewalld.helper(5).module (s)
: seemodule
tag in firewalld.helper(5).ports (a(ss))
: array of port and protocol pairs. Seeport
tag in firewalld.helper(5).
Possible errors: INVALID_HELPER
getHelpers
() → asReturn array of helper names (s) in runtime configuration. For permanent configuration see org.fedoraproject.FirewallD1.config.Methods.listHelpers.
getIcmpTypeSettings
(s:icmptype
) → (sssas)Return runtime settings of given
icmptype
. For getting permanent settings see org.fedoraproject.FirewallD1.config.icmptype.Methods.getSettings. Settings are in format:version
,name
,description
, array ofdestinations
.
version (s)
: seeversion
attribute oficmptype
tag in firewalld.icmptype(5).name (s)
: seeshort
tag in firewalld.icmptype(5).description (s)
: seedescription
tag in firewalld.icmptype(5).destinations (as)
: array, either empty or containing strings 'ipv4' or 'ipv6', seedestination
tag in firewalld.icmptype(5).
Possible errors: INVALID_ICMPTYPE
getLogDenied
() → sReturns the LogDenied value. If LogDenied is enabled, then logging rules are added right before reject and drop rules in the INPUT, FORWARD and OUTPUT chains for the default rules and also final reject and drop rules in zones. Possible values are:
all
,unicast
,broadcast
,multicast
andoff
. The default value isoff
getServiceSettings
(s:service
) → (sssa(ss)asa{ss}asa(ss))This function is deprecated, use org.fedoraproject.FirewallD1.Methods.getServiceSettings2 instead.
getServiceSettings2
(s:service
) → s{sv}Return runtime settings of given
service
. For getting permanent settings see org.fedoraproject.FirewallD1.config.service.Methods.getSettings2. Settings are a dictionary indexed by keywords. For the type of each value see below. If the value is empty it may be omitted.
version (s)
: seeversion
attribute ofservice
tag in firewalld.service(5).name (s)
: seeshort
tag in firewalld.service(5).description (s)
: seedescription
tag in firewalld.service(5).ports (a(ss))
: array of port and protocol pairs. Seeport
tag in firewalld.service(5).module names (as)
: array of kernel netfilter helpers, seemodule
tag in firewalld.service(5).destinations (a{ss})
: dictionary of {IP family : IP address} where 'IP family' key can be either 'ipv4' or 'ipv6'. Seedestination
tag in firewalld.service(5).protocols (as)
: array of protocols, seeprotocol
tag in firewalld.service(5).source_ports (a(ss))
: array of port and protocol pairs. Seesource-port
tag in firewalld.service(5).includes (as)
: array of service includes, seeinclude
tag in firewalld.service(5).helpers (as)
: array of service helpers, seehelper
tag in firewalld.service(5).
Possible errors: INVALID_SERVICE
getZoneSettings
(s:zone
) → (sssbsasa(ss)asba(ssss)asasasasa(ss)b)This function is deprecated, use org.fedoraproject.FirewallD1.zone.Methods.getZoneSettings2 instead.
listIcmpTypes
() → asReturn array of names (s) of icmp types in runtime configuration. For permanent configuration see org.fedoraproject.FirewallD1.config.Methods.listIcmpTypes.
listServices
() → asReturn array of service names (s) in runtime configuration. For permanent configuration see org.fedoraproject.FirewallD1.config.Methods.listServices.
queryPanicMode
() → bReturn true if panic mode is enabled, false otherwise. In panic mode all incoming and outgoing packets are dropped.
reload
() → NothingReload firewall rules and keep state information. Current permanent configuration will become new runtime configuration, i.e. all runtime only changes done until reload are lost with reload if they have not been also in permanent configuration.
runtimeToPermanent
() → NothingMake runtime settings permanent. Replaces permanent settings with runtime settings for zones, services, icmptypes, direct (deprecated) and policies (lockdown whitelist).
Possible errors: RT_TO_PERM_FAILED
checkPermanentConfig
() → NothingRun checks on the permanent configuration. This is most useful if changes were made manually to configuration files.
Possible errors: any
setDefaultZone
(s:zone
) → NothingSet 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. This is a runtime and permanent change.Possible errors: ZONE_ALREADY_SET, COMMAND_FAILED
setLogDenied
(s:value
) → NothingSet LogDenied value to
value
. If LogDenied is enabled, then logging rules are added right before reject and drop rules in the INPUT, FORWARD and OUTPUT chains for the default rules and also final reject and drop rules in zones. Possible values are:all
,unicast
,broadcast
,multicast
andoff
. The default value isoff
This is a runtime and permanent change.Possible errors: ALREADY_SET, INVALID_VALUE
Signals
DefaultZoneChanged
(s:zone
)Emitted when default zone has been changed to
zone
.LogDeniedChanged
(s:value
)Emitted when 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. Also emitted for a complete reload.
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.
IPv6
- b - (ro)Indicates whether the firewall has IPv6 support.
IPv6_rpfilter
- b - (ro)Indicates whether the reverse path filter test on a packet for IPv6 is enabled. If a reply to the packet would be sent via the same interface that the packet arrived on, the packet will match and be accepted, otherwise dropped.
IPv6ICMPTypes
- as - (ro)The list of supported IPv6 ICMP types.
nf_conntrach_helper_setting
- b - (ro)Deprecated. Always False.
nf_conntrack_helpers
- a{sas} - (ro)Deprecated. Always returns an empty dictionary.
nf_nat_helpers
- a{sas} - (ro)Deprecated. Always returns an empty dictionary.
interface_version
- s - (ro)firewalld D-Bus interface version string.
state
- s - (ro)firewalld state. This can be either
INIT
,FAILED
, orRUNNING
. InINIT
state, firewalld is starting up and initializing. InFAILED
state, firewalld completely started but experienced a failure.version
- s - (ro)firewalld version string.
org.fedoraproject.FirewallD1.ipset
Operations in this interface allows one to get, add, remove and query runtime ipset settings. For permanent configuration see org.fedoraproject.FirewallD1.config.ipset interface.Methods
addEntry
(s: ipset, s: entry) → asAdd a new
entry
toipset
. The entry must match the type of the ipset. If the ipset is using the timeout option, it is not possible to see the entries, as they are timing out automatically in the kernel. For permanent operation see org.fedoraproject.FirewallD1.config.ipset.Methods.addEntry.Possible errors: INVALID_IPSET, IPSET_WITH_TIMEOUT
getEntries
(s: ipset) → NothingGet all entries added to the
ipset
. If the ipset is using the timeout option, it is not possible to see the entries, as they are timing out automatically in the kernel. Return value is a array ofentry
. For permanent operation see org.fedoraproject.FirewallD1.config.ipset.Methods.getEntries.Possible errors: INVALID_IPSET, IPSET_WITH_TIMEOUT
getIPSetSettings
(s: ipset) → (ssssa{ss}as)Return runtime settings of given
ipset
. For getting permanent settings see org.fedoraproject.FirewallD1.config.ipset.Methods.getSettings. Settings are in format:version
,name
,description
,type
, dictionary ofoptions
and array ofentries
.
version (s)
: seeversion
attribute ofipset
tag in firewalld.ipset(5).name (s)
: seeshort
tag in firewalld.ipset(5).description (s)
: seedescription
tag in firewalld.ipset(5).type (s)
: seetype
attribute ofipset
tag in firewalld.ipset(5).options (a{ss})
: dictionary of {option : value} . Seeoptions
tag in firewalld.ipset(5).entries (as)
: array of entries, seeentry
tag in firewalld.ipset(5).
Possible errors: INVALID_IPSET
getIPSets
() → asReturn array of ipset names (s) in runtime configuration. For permanent configuration see org.fedoraproject.FirewallD1.config.Methods.listIPSets.
queryEntry
(s: ipset, s: entry) → bReturn whether
entry
has been added toipset
. For permanent operation see org.fedoraproject.FirewallD1.config.ipset.Methods.queryEntry.Possible errors: INVALID_IPSET
queryIPSet
(s: ipset) → bReturn whether
ipset
is defined in runtime configuration.removeEntry
(s: ipset, s: entry) → asRemoves an
entry
fromipset
. For permanent operation see org.fedoraproject.FirewallD1.config.ipset.Methods.removeEntry.Possible errors: INVALID_IPSET, IPSET_WITH_TIMEOUT
setEntries
(as: entries) → NothingPermanently set list of entries to
entries
. For permanent operation see org.fedoraproject.FirewallD1.config.ipset.Methods.setEntries. Seeentry
tag in firewalld.ipset(5).
org.fedoraproject.FirewallD1.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).This interface enables more direct access to the firewall. It enables runtime manipulation with chains and rules. For permanent configuration see org.fedoraproject.FirewallD1.config.direct interface.Methods
addChain
(s: ipv, s: table, s: chain) → NothingAdd a new
chain
totable
foripv
being eitheripv4
(iptables) oripv6
(ip6tables) oreb
(ebtables). Make sure there's no other chain with this name already. There already exist basic chains to use with direct methods, for exampleINPUT_direct
chain. These chains are jumped into before chains for zones, i.e. every rule put intoINPUT_direct
will be checked before rules in zones. For permanent operation see org.fedoraproject.FirewallD1.config.direct.Methods.addChain.Possible errors: INVALID_IPV, INVALID_TABLE, ALREADY_ENABLED, COMMAND_FAILED
addPassthrough
(s: ipv, as: args) → NothingAdd a tracked passthrough rule with the arguments
args
foripv
being eitheripv4
(iptables) oripv6
(ip6tables) oreb
(ebtables). Valid commands in args are only-A/--append
,-I/--insert
and-N/--new-chain
. This method is (unlike passthrough method) tracked, i.e. firewalld remembers it. It's useful with org.fedoraproject.FirewallD1.Methods.runtimeToPermanent For permanent operation see 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) → NothingAdd a rule with the arguments
args
tochain
intable
withpriority
foripv
being eitheripv4
(iptables) oripv6
(ip6tables) oreb
(ebtables). The priority is used to order rules. Priority 0 means add rule on top of the chain, with a higher priority the rule will be added further down. Rules with the same priority are on the same level and the order of these rules is not fixed and may change. If you want to make sure that a rule will be added after another one, use a low priority for the first and a higher for the following. For permanent operation see org.fedoraproject.FirewallD1.config.direct.Methods.addRule.Possible errors: INVALID_IPV, INVALID_TABLE, ALREADY_ENABLED, COMMAND_FAILED
getAllChains
() → a(sss)Get all chains added to all tables in format: ipv, table, chain. This concerns only chains previously added with
addChain
. Return value is a array of (ipv
,table
,chain
). For permanent operation see org.fedoraproject.FirewallD1.config.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.
getAllPassthroughs
() → a(sas)Get all tracked passthrough rules added in all ipv types in format: ipv, rule. This concerns only rules previously added with
addPassthrough
. Return value is a array of (ipv
, array ofarguments
). For permanent operation see 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)Get all rules added to all chains in all tables in format: ipv, table, chain, priority, rule. This concerns only rules previously added with
addRule
. Return value is a array of (ipv
,table
,chain
,priority
, array ofarguments
). For permanent operation see org.fedoraproject.FirewallD1.config.direct.Methods.getAllRules.
ipv (s)
: eitheripv4
(iptables) oripv6
(ip6tables) oreb
(ebtables).table (s)
: one offilter
,mangle
,nat
,raw
,security
chain (s)
: name of a chain.priority (i)
: used to order rules.arguments (as)
: array of commands, parameters and other iptables/ip6tables/ebtables command line options.
getChains
(s: ipv, s: table) → asReturn an array of chains (s) added to
table
foripv
being eitheripv4
(iptables) oripv6
(ip6tables) oreb
(ebtables). This concerns only chains previously added withaddChain
. For permanent operation see org.fedoraproject.FirewallD1.config.direct.Methods.getChains.Possible errors: INVALID_IPV, INVALID_TABLE
getPassthroughs
(s: ipv) → aasGet tracked passthrough rules added in either
ipv4
(iptables) oripv6
(ip6tables) oreb
(ebtables). This concerns only rules previously added withaddPassthrough
. Return value is a array of (array ofarguments
). For permanent operation see 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)Get all rules added to
chain
intable
foripv
being eitheripv4
(iptables) oripv6
(ip6tables) oreb
(ebtables). This concerns only rules previously added withaddRule
. Return value is a array of (priority
, array ofarguments
). For permanent operation see org.fedoraproject.FirewallD1.config.direct.Methods.getRules.
priority (i)
: used to order rules.arguments (as)
: array of commands, parameters and other iptables/ip6tables/ebtables command line options.
Possible errors: INVALID_IPV, INVALID_TABLE
passthrough
(s: ipv, as: args) → sPass a command through to the firewall.
ipv
can be eitheripv4
(iptables) oripv6
(ip6tables) oreb
(ebtables).args
can be all iptables, ip6tables and ebtables command line arguments.args
can be all iptables, ip6tables and ebtables command line arguments. This command is untracked, which means that firewalld is not able to provide information about this command later on.Possible errors: COMMAND_FAILED
queryChain
(s: ipv, s: table, s: chain) → bReturn whether a
chain
exists intable
foripv
being eitheripv4
(iptables) oripv6
(ip6tables) oreb
(ebtables). This concerns only chains previously added withaddChain
. For permanent operation see org.fedoraproject.FirewallD1.config.direct.Methods.queryChain.Possible errors: INVALID_IPV, INVALID_TABLE
queryPassthrough
(s: ipv, as: args) → bReturn whether a tracked passthrough rule with the arguments
args
exists foripv
being eitheripv4
(iptables) oripv6
(ip6tables) oreb
(ebtables). This concerns only rules previously added withaddPassthrough
. For permanent operation see org.fedoraproject.FirewallD1.config.direct.Methods.queryPassthrough.Possible errors: INVALID_IPV
queryRule
(s: ipv, s: table, s: chain, i: priority, as: args) → bReturn whether a rule with
priority
and the argumentsargs
exists inchain
intable
foripv
being eitheripv4
(iptables) oripv6
(ip6tables) oreb
(ebtables). This concerns only rules previously added withaddRule
. For permanent operation see org.fedoraproject.FirewallD1.config.direct.Methods.queryRule.Possible errors: INVALID_IPV, INVALID_TABLE
removeAllPassthroughs
() → NothingRemove all passthrough rules previously added with
addPassthrough
.removeChain
(s: ipv, s: table, s: chain) → NothingRemove a
chain
fromtable
foripv
being eitheripv4
(iptables) oripv6
(ip6tables) oreb
(ebtables). Only chains previously added withaddChain
can be removed this way. For permanent operation see org.fedoraproject.FirewallD1.config.direct.Methods.removeChain.Possible errors: INVALID_IPV, INVALID_TABLE, NOT_ENABLED, COMMAND_FAILED
removePassthrough
(s: ipv, as: args) → NothingRemove a tracked passthrough rule with arguments
args
foripv
being eitheripv4
(iptables) oripv6
(ip6tables) oreb
(ebtables). Only rules previously added withaddPassthrough
can be removed this way. For permanent operation see org.fedoraproject.FirewallD1.config.direct.Methods.removePassthrough.Possible errors: INVALID_IPV, NOT_ENABLED, COMMAND_FAILED
removeRule
(s: ipv, s: table, s: chain, i: priority, as: args) → NothingRemove a rule with
priority
and argumentsargs
fromchain
intable
foripv
being eitheripv4
(iptables) oripv6
(ip6tables) oreb
(ebtables). Only rules previously added withaddRule
can be removed this way. For permanent operation see org.fedoraproject.FirewallD1.config.direct.Methods.removeRule.Possible errors: INVALID_IPV, INVALID_TABLE, NOT_ENABLED, COMMAND_FAILED
removeRules
(s: ipv, s: table, s: chain) → NothingRemove all rules from
chain
intable
foripv
being eitheripv4
(iptables) oripv6
(ip6tables) oreb
(ebtables). This concerns only rules previously added withaddRule
. For permanent operation see org.fedoraproject.FirewallD1.config.direct.Methods.removeRules.Possible errors: INVALID_IPV, INVALID_TABLE
Signals
ChainAdded(s: ipv, s: table, s: chain) Emitted when
chain
has been added intotable
foripv
being eitheripv4
(iptables) oripv6
(ip6tables) oreb
(ebtables).ChainRemoved(s: ipv, s: table, s: chain) Emitted when
chain
has been removed fromtable
foripv
being eitheripv4
(iptables) oripv6
(ip6tables) oreb
(ebtables).PassthroughAdded(s: ipv, as: args) Emitted when a tracked passthruogh rule with
args
has been added foripv
being eitheripv4
(iptables) oripv6
(ip6tables) oreb
(ebtables).PassthroughRemoved(s: ipv, as: args) Emitted when a tracked passthrough rule with
args
has been removed foripv
being eitheripv4
(iptables) oripv6
(ip6tables) oreb
(ebtables).RuleAdded(s: ipv, s: table, s: chain, i: priority, as: args) Emitted when a rule with
args
has been added tochain
intable
withpriority
foripv
being eitheripv4
(iptables) oripv6
(ip6tables) oreb
(ebtables).RuleRemoved(s: ipv, s: table, s: chain, i: priority, as: args) Emitted when a rule with
args
has been removed fromchain
intable
withpriority
foripv
being eitheripv4
(iptables) oripv6
(ip6tables) oreb
(ebtables).
org.fedoraproject.FirewallD1.policies
Enables firewalld to be able to lock down configuration changes from local applications. Local applications or services are able to change the firewall configuration if they are running as root (example: libvirt). With these operations administrator can lock the firewall configuration so that either none or only applications that are in the whitelist are able to request firewall changes. For permanent configuration see org.fedoraproject.FirewallD1.config.policies interface.Methods
addLockdownWhitelistCommand
(s: command) → NothingAdd
command
to whitelist. Seecommand
option in firewalld.lockdown-whitelist(5). For permanent operation see org.fedoraproject.FirewallD1.config.policies.Methods.addLockdownWhitelistCommand.Possible errors: ALREADY_ENABLED, INVALID_COMMAND
addLockdownWhitelistContext
(s: context) → NothingAdd
context
to whitelist. Seeselinux
option in firewalld.lockdown-whitelist(5). For permanent operation see org.fedoraproject.FirewallD1.config.policies.Methods.addLockdownWhitelistContext.Possible errors: ALREADY_ENABLED, INVALID_COMMAND
addLockdownWhitelistUid
(i: uid) → NothingAdd user id
uid
to whitelist. Seeuser
option in firewalld.lockdown-whitelist(5). For permanent operation see org.fedoraproject.FirewallD1.config.policies.Methods.addLockdownWhitelistUid.Possible errors: ALREADY_ENABLED, INVALID_COMMAND
addLockdownWhitelistUser
(s: user) → NothingAdd
user
name to whitelist. Seeuser
option in firewalld.lockdown-whitelist(5). For permanent operation see org.fedoraproject.FirewallD1.config.policies.Methods.addLockdownWhitelistUser.Possible errors: ALREADY_ENABLED, INVALID_COMMAND
disableLockdown
() → NothingDisable lockdown. This is a runtime and permanent change.
Possible errors: NOT_ENABLED
enableLockdown
() → NothingEnable lockdown. Be careful - if the calling application/user is not on lockdown whitelist when you enable lockdown you won't be able to disable it again with the application, you would need to edit firewalld.conf. This is a runtime and permanent change.
Possible errors: ALREADY_ENABLED
getLockdownWhitelistCommands
() → asList all command lines (s) that are on whitelist. For permanent operation see org.fedoraproject.FirewallD1.config.policies.Methods.getLockdownWhitelistCommands.
getLockdownWhitelistContexts
() → asList all contexts (s) that are on whitelist. For permanent operation see org.fedoraproject.FirewallD1.config.policies.Methods.getLockdownWhitelistContexts.
getLockdownWhitelistUids
() → aiList all user ids (i) that are on whitelist. For permanent operation see org.fedoraproject.FirewallD1.config.policies.Methods.getLockdownWhitelistUids.
getLockdownWhitelistUsers
() → asList all users (s) that are on whitelist. For permanent operation see org.fedoraproject.FirewallD1.config.policies.Methods.getLockdownWhitelistUsers.
queryLockdown
() → bQuery whether lockdown is enabled.
queryLockdownWhitelistCommand
(s: command) → bQuery whether
command
is on whitelist. For permanent operation see org.fedoraproject.FirewallD1.config.policies.Methods.queryLockdownWhitelistCommand.queryLockdownWhitelistContext
(s: context) → bQuery whether
context
is on whitelist. For permanent operation see org.fedoraproject.FirewallD1.config.policies.Methods.queryLockdownWhitelistContext.queryLockdownWhitelistUid
(i: uid) → bQuery whether user id
uid
is on whitelist. For permanent operation see org.fedoraproject.FirewallD1.config.policies.Methods.queryLockdownWhitelistUid.queryLockdownWhitelistUser
(s: user) → bQuery whether
user
is on whitelist. For permanent operation see org.fedoraproject.FirewallD1.config.policies.Methods.queryLockdownWhitelistUser.removeLockdownWhitelistCommand
(s: command) → NothingRemove
command
from whitelist. For permanent operation see org.fedoraproject.FirewallD1.config.policies.Methods.removeLockdownWhitelistCommand.Possible errors: NOT_ENABLED
removeLockdownWhitelistContext
(s: context) → NothingRemove
context
from whitelist. For permanent operation see org.fedoraproject.FirewallD1.config.policies.Methods.removeLockdownWhitelistContext.Possible errors: NOT_ENABLED
removeLockdownWhitelistUid
(i: uid) → NothingRemove user id
uid
from whitelist. For permanent operation see org.fedoraproject.FirewallD1.config.policies.Methods.removeLockdownWhitelistUid.Possible errors: NOT_ENABLED
removeLockdownWhitelistUser
(s: user) → NothingRemove
user
from whitelist. For permanent operation see org.fedoraproject.FirewallD1.config.policies.Methods.removeLockdownWhitelistUser.Possible errors: NOT_ENABLED
Signals
LockdownDisabled() Emitted when lockdown has been disabled.
LockdownEnabled() Emitted when lockdown has been enabled.
LockdownWhitelistCommandAdded(s: command) Emitted when
command
has been added to whitelist.LockdownWhitelistCommandRemoved(s: command) Emitted when
command
has been removed from whitelist.LockdownWhitelistContextAdded(s: context) Emitted when
context
has been added to whitelist.LockdownWhitelistContextRemoved(s: context) Emitted when
context
has been removed from whitelist.LockdownWhitelistUidAdded(i: uid) Emitted when user id
uid
has been added to whitelist.LockdownWhitelistUidRemoved(i: uid) Emitted when user id
uid
has been removed from whitelist.LockdownWhitelistUserAdded(s: user) Emitted when
user
has been added to whitelist.LockdownWhitelistUserRemoved(s: user) Emitted when
user
has been removed from whitelist.
org.fedoraproject.FirewallD1.zone
Operations in this interface allows one to get, add, remove and query runtime zone's settings. For permanent settings see org.fedoraproject.FirewallD1.config.zone interface.Methods
getZoneSettings2
(s:zone
) → a{sv}Return runtime settings of given
zone
. For getting permanent settings see org.fedoraproject.FirewallD1.config.zone.Methods.getSettings2. Settings are a dictionary indexed by keywords. For the type of each value see below. If the value is empty it may be omitted.
version (s)
: seeversion
attribute ofzone
tag in firewalld.zone(5).name (s)
: seeshort
tag in firewalld.zone(5).description (s)
: seedescription
tag in firewalld.zone(5).target (s)
: seetarget
attribute ofzone
tag in firewalld.zone(5).services (as)
: array of service names, seeservice
tag in firewalld.zone(5).ports (a(ss))
: array of port and protocol pairs. Seeport
tag in firewalld.zone(5).icmp_blocks (as)
: array of icmp-blocks. Seeicmp-block
tag in firewalld.zone(5).masquerade (b)
: seemasquerade
tag in firewalld.zone(5).forward_ports (a(ssss))
: array of (port, protocol, to-port, to-addr). Seeforward-port
tag in firewalld.zone(5).interfaces (as)
: array of interfaces. Seeinterface
tag in firewalld.zone(5).sources (as)
: array of source addresses. Seesource
tag in firewalld.zone(5).rules_str (as)
: array of rich-language rules. Seerule
tag in firewalld.zone(5).protocols (as)
: array of protocols, seeprotocol
tag in firewalld.zone(5).source_ports (a(ss))
: array of port and protocol pairs. Seesource-port
tag in firewalld.zone(5).icmp_block_inversion (b)
: seeicmp-block-inversion
tag in firewalld.zone(5).forward (b)
: seeforward
tag in firewalld.zone(5).
Possible errors: INVALID_ZONE
setZoneSettings2
(s:zone
, a{sv}:settings
, i:timeout
)Set runtime settings of given
zone
. For setting permanent settings see org.fedoraproject.FirewallD1.config.zone.Methods.update2. Settings are a dictionary indexed by keywords. For the type of each value see below. To zero a value pass an empty string or list.
services (as)
: array of service names, seeservice
tag in firewalld.zone(5).ports (a(ss))
: array of port and protocol pairs. Seeport
tag in firewalld.zone(5).icmp_blocks (as)
: array of icmp-blocks. Seeicmp-block
tag in firewalld.zone(5).masquerade (b)
: seemasquerade
tag in firewalld.zone(5).forward_ports (a(ssss))
: array of (port, protocol, to-port, to-addr). Seeforward-port
tag in firewalld.zone(5).interfaces (as)
: array of interfaces. Seeinterface
tag in firewalld.zone(5).sources (as)
: array of source addresses. Seesource
tag in firewalld.zone(5).rules_str (as)
: array of rich-language rules. Seerule
tag in firewalld.zone(5).protocols (as)
: array of protocols, seeprotocol
tag in firewalld.zone(5).source_ports (a(ss))
: array of port and protocol pairs. Seesource-port
tag in firewalld.zone(5).icmp_block_inversion (b)
: seeicmp-block-inversion
tag in firewalld.zone(5).forward (b)
: seeforward
tag in firewalld.zone(5).
Possible errors: INVALID_ZONE
addForwardPort
(s: zone, s: port, s: protocol, s: toport, s: toaddr, i: timeout) → sAdd the IPv4 forward port into
zone
. Ifzone
is empty, use default zone. The port can either be a single port numberportid
or a port rangeportid
-portid
. The protocol can either betcp
orudp
. The destination address is a simple IP address. Iftimeout
is non-zero, the operation will be active only for the amount of seconds. For permanent settings see org.fedoraproject.FirewallD1.config.zone.Methods.addForwardPort.Returns name of zone to which the forward port was added.
Possible errors: INVALID_ZONE, INVALID_PORT, MISSING_PROTOCOL, INVALID_PROTOCOL, INVALID_ADDR, INVALID_FORWARD, ALREADY_ENABLED, INVALID_COMMAND
addIcmpBlock
(s: zone, s: icmp, i: timeout) → sAdd an ICMP block
icmp
intozone
. Theicmp
is the one of the icmp types firewalld supports. To get a listing of supported icmp types use org.fedoraproject.FirewallD1.Methods.listIcmpTypes Ifzone
is empty, use default zone. Iftimeout
is non-zero, the operation will be active only for the amount of seconds. For permanent settings see org.fedoraproject.FirewallD1.config.zone.Methods.addIcmpBlock.Returns name of zone to which the ICMP block was added.
Possible errors: INVALID_ZONE, INVALID_ICMPTYPE, ALREADY_ENABLED, INVALID_COMMAND
addIcmpBlockInversion
(s: zone) → sAdd ICMP block inversion to
zone
. Ifzone
is empty, use default zone. For permanent settings see org.fedoraproject.FirewallD1.config.zone.Methods.addIcmpBlockInversion.Returns name of zone to which the ICMP block inversion was added.
Possible errors: INVALID_ZONE, ALREADY_ENABLED, INVALID_COMMAND
addInterface
(s: zone, s: interface) → sBind
interface
withzone
. From now on all traffic going through theinterface
will respect thezone
's settings. Ifzone
is empty, use default zone. For permanent settings see org.fedoraproject.FirewallD1.config.zone.Methods.addInterface.Returns name of zone to which the interface was bound.
Possible errors: INVALID_ZONE, INVALID_INTERFACE, ALREADY_ENABLED, INVALID_COMMAND
addMasquerade
(s: zone, i: timeout) → sEnable masquerade in
zone
. Ifzone
is empty, use default zone. Iftimeout
is non-zero, masquerading will be active for the amount of seconds. For permanent settings see org.fedoraproject.FirewallD1.config.zone.Methods.addMasquerade.Returns name of zone in which the masquerade was enabled.
Possible errors: INVALID_ZONE, ALREADY_ENABLED, INVALID_COMMAND
addPort
(s: zone, s: port, s: protocol, i: timeout) → sAdd port into
zone
. Ifzone
is empty, use default zone. The port can either be a single port number or a port rangeportid
-portid
. The protocol can either betcp
orudp
. Iftimeout
is non-zero, the operation will be active only for the amount of seconds. For permanent settings see org.fedoraproject.FirewallD1.config.zone.Methods.addPort.Returns name of 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) → sAdd protocol into
zone
. Ifzone
is empty, use default zone. The protocol can be any protocol supported by the system. Please have a look at/etc/protocols
for supported protocols. Iftimeout
is non-zero, the operation will be active only for the amount of seconds. For permanent settings see org.fedoraproject.FirewallD1.config.zone.Methods.addProtocol.Returns name of zone to which the protocol was added.
Possible errors: INVALID_ZONE, INVALID_PROTOCOL, ALREADY_ENABLED, INVALID_COMMAND
addRichRule
(s: zone, s: rule, i: timeout) → sAdd rich language
rule
intozone
. For the rich language rule syntax, please have a look at firewalld.direct(5). Ifzone
is empty, use default zone. Iftimeout
is non-zero, the operation will be active only for the amount of seconds. For permanent settings see org.fedoraproject.FirewallD1.config.zone.Methods.addRichRule.Returns name of zone to which the rich language rule was added.
Possible errors: INVALID_ZONE, INVALID_RULE, ALREADY_ENABLED, INVALID_COMMAND
addService
(s: zone, s: service, i: timeout) → sAdd
service
intozone
. Ifzone
is empty, use default zone. Iftimeout
is non-zero, the operation will be active only for the amount of seconds. To get a list of supported services, use org.fedoraproject.FirewallD1.Methods.listServices. For permanent settings see org.fedoraproject.FirewallD1.config.zone.Methods.addService.Returns name of zone to which the service was added.
Possible errors: INVALID_ZONE, INVALID_SERVICE, ALREADY_ENABLED, INVALID_COMMAND
addSource
(s: zone, s: source) → sBind
source
withzone
. From now on all traffic going from thissource
will respect thezone
'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. Ifzone
is empty, use default zone. For permanent settings see org.fedoraproject.FirewallD1.config.zone.Methods.addSource.Returns name of 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) → sAdd source port into
zone
. Ifzone
is empty, use default zone. The port can either be a single port number or a port rangeportid
-portid
. The protocol can either betcp
orudp
. Iftimeout
is non-zero, the operation will be active only for the amount of seconds. For permanent settings see org.fedoraproject.FirewallD1.config.zone.Methods.addSourcePort.Returns name of 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) → sThis function is deprecated, use org.fedoraproject.FirewallD1.zone.Methods.changeZoneOfInterface instead.
changeZoneOfInterface
(s: zone, s: interface) → sChange a zone an
interface
is bound to tozone
. It's basically removeInterface(interface
) followed by addInterface(zone
,interface
). Ifinterface
has not been bound to a zone before, it behaves likeaddInterface
. Ifzone
is empty, use default zone.Returns name of zone to which the interface was bound.
Possible errors: INVALID_ZONE, ZONE_ALREADY_SET, ZONE_CONFLICT
changeZoneOfSource
(s: zone, s: source) → sChange a zone an
source
is bound to tozone
. It's basically removeSource(source
) followed by addSource(zone
,source
). Ifsource
has not been bound to a zone before, it behaves likeaddSource
. Ifzone
is empty, use default zone.Returns name of zone to which the source was bound.
Possible errors: INVALID_ZONE, ZONE_ALREADY_SET, ZONE_CONFLICT
getActiveZones
() → a{sa{sas}}Return dictionary of currently active zones altogether with interfaces and sources used in these zones. Active zones are zones, that have a binding to an interface or source.
Return value is a dictionary where keys are zone names (s) and values are again dictionaries where keys are either 'interfaces' or 'sources' and values are arrays of interface names (s) or sources (s).
getForwardPorts
(s: zone) → aasReturn array of IPv4 forward ports previously added into
zone
. Ifzone
is empty, use default zone. For getting permanent settings see org.fedoraproject.FirewallD1.config.zone.Methods.getForwardPorts.Return value is array of 4-tuples, where each 4-tuple consists of (port, protocol, to-port, to-addr). to-addr might be empty in case of local forwarding.
Possible errors: INVALID_ZONE
getIcmpBlocks
(s: zone) → asReturn array of ICMP type (s) blocks previously added into
zone
. Ifzone
is empty, use default zone. For getting permanent settings see org.fedoraproject.FirewallD1.config.zone.Methods.getIcmpBlocks.Possible errors: INVALID_ZONE
getIcmpBlockInversion
(s: zone) → bReturn whether ICMP block inversion was previously added to
zone
. Ifzone
is empty, use default zone. For getting permanent settings see org.fedoraproject.FirewallD1.config.zone.Methods.getIcmpBlockInversion.Possible errors: INVALID_ZONE
getInterfaces
(s: zone) → asReturn array of interfaces (s) previously bound with
zone
. Ifzone
is empty, use default zone. For getting permanent settings see org.fedoraproject.FirewallD1.config.zone.Methods.getInterfaces.Possible errors: INVALID_ZONE
getPorts
(s: zone) → aasReturn array of ports (2-tuple of port and protocol) previously enabled in
zone
. Ifzone
is empty, use default zone. For getting permanent settings see org.fedoraproject.FirewallD1.config.zone.Methods.getPorts.Possible errors: INVALID_ZONE
getProtocols
(s: zone) → asReturn array of protocols (s) previously enabled in
zone
. Ifzone
is empty, use default zone. For getting permanent settings see org.fedoraproject.FirewallD1.config.zone.Methods.getProtocols.Possible errors: INVALID_ZONE
getRichRules
(s: zone) → asReturn array of rich language rules (s) previously added into
zone
. Ifzone
is empty, use default zone. For getting permanent settings see org.fedoraproject.FirewallD1.config.zone.Methods.getRichRules.Possible errors: INVALID_ZONE
getServices
(s: zone) → asReturn array of services (s) previously enabled in
zone
. Ifzone
is empty, use default zone. For getting permanent settings see org.fedoraproject.FirewallD1.config.zone.Methods.getServices.Possible errors: INVALID_ZONE
getSourcePorts
(s: zone) → aasReturn array of source ports (2-tuple of port and protocol) previously enabled in
zone
. Ifzone
is empty, use default zone. For getting permanent settings see org.fedoraproject.FirewallD1.config.zone.Methods.getSourcePorts.Possible errors: INVALID_ZONE
getSources
(s: zone) → asReturn array of sources (s) previously bound with
zone
. Ifzone
is empty, use default zone. For getting permanent settings see org.fedoraproject.FirewallD1.config.zone.Methods.getSources.Possible errors: INVALID_ZONE
getZoneOfInterface
(s: interface) → sReturn name (s) of zone the
interface
is bound to or empty string.getZoneOfSource
(s: source) → sReturn name (s) of zone the
source
is bound to or empty string.getZones
() → asReturn array of names (s) of predefined zones known to current runtime environment. For list of zones known to permanent environment see org.fedoraproject.FirewallD1.config.Methods.listZones. The lists (of zones known to runtime and permanent environment) will contain same zones in most cases, but might differ for example if org.fedoraproject.FirewallD1.config.Methods.addZone has been called recently, but firewalld has not been reloaded since then.
isImmutable
(s: zone) → bDeprecated.
queryForwardPort
(s: zone, s: port, s: protocol, s: toport, s: toaddr) → bReturn whether the IPv4 forward port (
port
,protocol
,toport
,toaddr
) has been added intozone
. Ifzone
is empty, use default zone. For permanent operation see org.fedoraproject.FirewallD1.config.zone.Methods.queryForwardPort.Possible errors: INVALID_ZONE, INVALID_PORT, MISSING_PROTOCOL, INVALID_PROTOCOL, INVALID_ADDR, INVALID_FORWARD
queryIcmpBlock
(s: zone, s: icmp) → bReturn whether an ICMP block for
icmp
has been added intozone
. Ifzone
is empty, use default zone. For permanent operation see org.fedoraproject.FirewallD1.config.zone.Methods.queryIcmpBlock.Possible errors: INVALID_ZONE, INVALID_ICMPTYPE
queryIcmpBlockInversion
(s: zone) → bReturn whether ICMP block inversion has been added to
zone
. Ifzone
is empty, use default zone. For permanent operation see org.fedoraproject.FirewallD1.config.zone.Methods.queryIcmpBlockInversion.Possible errors: INVALID_ZONE, INVALID_ICMPTYPE
queryInterface
(s: zone, s: interface) → bQuery whether
interface
has been bound tozone
. Ifzone
is empty, use default zone. For permanent operation see org.fedoraproject.FirewallD1.config.zone.Methods.queryInterface.Possible errors: INVALID_ZONE, INVALID_INTERFACE
queryMasquerade
(s: zone) → bReturn whether masquerading has been enabled in
zone
Ifzone
is empty, use default zone. For permanent operation see org.fedoraproject.FirewallD1.config.zone.Methods.queryMasquerade.Possible errors: INVALID_ZONE
queryPort
(s: zone, s: port, s: protocol) → bReturn whether
port
/protocol
has been added inzone
. Ifzone
is empty, use default zone. For permanent operation see org.fedoraproject.FirewallD1.config.zone.Methods.queryPort.Possible errors: INVALID_ZONE, INVALID_PORT, MISSING_PROTOCOL, INVALID_PROTOCOL
queryProtocol
(s: zone, s: protocol) → bReturn whether
protocol
has been added inzone
. Ifzone
is empty, use default zone. For permanent operation see org.fedoraproject.FirewallD1.config.zone.Methods.queryProtocol.Possible errors: INVALID_ZONE, INVALID_PROTOCOL
queryRichRule
(s: zone, s: rule) → bReturn whether rich rule
rule
has been added inzone
. Ifzone
is empty, use default zone. For permanent operation see org.fedoraproject.FirewallD1.config.zone.Methods.queryRichRule.Possible errors: INVALID_ZONE, INVALID_RULE
queryService
(s: zone, s: service) → bReturn whether
service
has been added forzone
. Ifzone
is empty, use default zone. For permanent operation see org.fedoraproject.FirewallD1.config.zone.Methods.queryService.Possible errors: INVALID_ZONE, INVALID_SERVICE
querySource
(s: zone, s: source) → bQuery whether
source
has been bound tozone
. Ifzone
is empty, use default zone. For permanent operation see org.fedoraproject.FirewallD1.config.zone.Methods.querySource.Possible errors: INVALID_ZONE, INVALID_ADDR
querySourcePort
(s: zone, s: port, s: protocol) → bReturn whether
port
/protocol
has been added inzone
. Ifzone
is empty, use default zone. For permanent operation see org.fedoraproject.FirewallD1.config.zone.Methods.querySourcePort.Possible errors: INVALID_ZONE, INVALID_PORT, MISSING_PROTOCOL, INVALID_PROTOCOL
removeForwardPort
(s: zone, s: port, s: protocol, s: toport, s: toaddr) → sRemove IPv4 forward port ((
port
,protocol
,toport
,toaddr
)) fromzone
. Ifzone
is empty, use default zone. For permanent operation see org.fedoraproject.FirewallD1.config.zone.Methods.removeForwardPort.Returns name of zone from which the forward port was removed.
Possible errors: INVALID_ZONE, INVALID_PORT, MISSING_PROTOCOL, INVALID_PROTOCOL, INVALID_ADDR, INVALID_FORWARD, NOT_ENABLED, INVALID_COMMAND
removeIcmpBlock
(s: zone, s: icmp) → sRemove ICMP block
icmp
fromzone
. Ifzone
is empty, use default zone. For permanent operation see org.fedoraproject.FirewallD1.config.zone.Methods.removeIcmpBlock.Returns name of zone from which the ICMP block was removed.
Possible errors: INVALID_ZONE, INVALID_ICMPTYPE, NOT_ENABLED, INVALID_COMMAND
removeIcmpBlockInversion
(s: zone) → sRemove ICMP block inversion from
zone
. Ifzone
is empty, use default zone. For permanent operation see org.fedoraproject.FirewallD1.config.zone.Methods.removeIcmpBlockInversion.Returns name of zone from which the ICMP block inversion was removed.
Possible errors: INVALID_ZONE, NOT_ENABLED, INVALID_COMMAND
removeInterface
(s: zone, s: interface) → sRemove binding of
interface
fromzone
. Ifzone
is empty, the interface will be removed from zone it belongs to. For permanent operation see org.fedoraproject.FirewallD1.config.zone.Methods.removeInterface.Returns name of zone from which the
interface
was removed.Possible errors: INVALID_ZONE, INVALID_INTERFACE, NOT_ENABLED, INVALID_COMMAND
removeMasquerade
(s: zone) → sDisable masquerade for
zone
. Ifzone
is empty, use default zone. For permanent operation see org.fedoraproject.FirewallD1.config.zone.Methods.removeMasquerade.Returns name of zone for which the masquerade was disabled.
Possible errors: INVALID_ZONE, NOT_ENABLED, INVALID_COMMAND
removePort
(s: zone, s: port, s: protocol) → sRemove
port
/protocol
fromzone
. Ifzone
is empty, use default zone. For permanent operation see org.fedoraproject.FirewallD1.config.zone.Methods.removePort.Returns name of zone from which the port was removed.
Possible errors: INVALID_ZONE, INVALID_PORT, MISSING_PROTOCOL, INVALID_PROTOCOL, NOT_ENABLED, INVALID_COMMAND
removeProtocol
(s: zone, s: protocol) → sRemove protocol from
zone
. Ifzone
is empty, use default zone. For permanent operation see org.fedoraproject.FirewallD1.config.zone.Methods.removeProtocol.Returns name of zone from which the protocol was removed.
Possible errors: INVALID_ZONE, INVALID_PROTOCOL, NOT_ENABLED, INVALID_COMMAND
removeRichRule
(s: zone, s: rule) → sRemove rich language
rule
fromzone
. Ifzone
is empty, use default zone. For permanent operation see org.fedoraproject.FirewallD1.config.zone.Methods.removeRichRule.Returns name of zone from which the rich language rule was removed.
Possible errors: INVALID_ZONE, INVALID_RULE, NOT_ENABLED, INVALID_COMMAND
removeService
(s: zone, s: service) → sRemove
service
fromzone
. Ifzone
is empty, use default zone. For permanent operation see org.fedoraproject.FirewallD1.config.zone.Methods.removeService.Returns name of zone from which the service was removed.
Possible errors: INVALID_ZONE, INVALID_SERVICE, NOT_ENABLED, INVALID_COMMAND
removeSource
(s: zone, s: source) → sRemove binding of
source
fromzone
. Ifzone
is empty, the source will be removed from zone it belongs to. For permanent operation see org.fedoraproject.FirewallD1.config.zone.Methods.removeSource.Returns name of zone from which the
source
was removed.Possible errors: INVALID_ZONE, INVALID_ADDR, NOT_ENABLED, INVALID_COMMAND
removeSourcePort
(s: zone, s: port, s: protocol) → sRemove
port
/protocol
fromzone
. Ifzone
is empty, use default zone. For permanent operation see org.fedoraproject.FirewallD1.config.zone.Methods.removeSourcePort.Returns name of zone from which the source port was removed.
Possible errors: INVALID_ZONE, INVALID_PORT, MISSING_PROTOCOL, INVALID_PROTOCOL, NOT_ENABLED, INVALID_COMMAND
Signals
ForwardPortAdded(s: zone, s: port, s: protocol, s: toport, s: toaddr, i: timeout) Emitted when forward port has been added to
zone
withtimeout
.ForwardPortRemoved(s: zone, s: port, s: protocol, s: toport, s: toaddr) Emitted when forward port has been removed from
zone
.IcmpBlockAdded(s: zone, s: icmp, i: timeout) Emitted when ICMP block for
icmp
has been added tozone
withtimeout
.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 ICMP block for
icmp
has been removed fromzone
.InterfaceAdded(s: zone, s: interface) Emitted when
interface
has been added tozone
.InterfaceRemoved(s: zone, s: interface) Emitted when
interface
has been removed fromzone
.MasqueradeAdded(s: zone, i: timeout) Emitted when masquerade has been enabled for
zone
.MasqueradeRemoved(s: zone) Emitted when masquerade has been disabled for
zone
.PortAdded(s: zone, s: port, s: protocol, i: timeout) Emitted when
port
/protocol
has been added tozone
withtimeout
.PortRemoved(s: zone, s: port, s: protocol) Emitted when
port
/protocol
has been removed fromzone
.ProtocolAdded(s: zone, s: protocol, i: timeout) Emitted when
protocol
has been added tozone
withtimeout
.ProtocolRemoved(s: zone, s: protocol) Emitted when
protocol
has been removed fromzone
.RichRuleAdded(s: zone, s: rule, i: timeout) Emitted when rich language
rule
has been added tozone
withtimeout
.RichRuleRemoved(s: zone, s: rule) Emitted when rich language
rule
has been removed fromzone
.ServiceAdded(s: zone, s: service, i: timeout) Emitted when
service
has been added tozone
withtimeout
.ServiceRemoved(s: zone, s: service) Emitted when
service
has been removed fromzone
.SourceAdded(s: zone, s: source) Emitted when
source
has been added tozone
.SourcePortAdded(s: zone, s: port, s: protocol, i: timeout) Emitted when
source-port
/protocol
has been added tozone
withtimeout
.SourcePortRemoved(s: zone, s: port, s: protocol) Emitted when
source-port
/protocol
has been removed fromzone
.SourceRemoved(s: zone, s: source) Emitted when
source
has been removed fromzone
.ZoneChanged(s: zone, s: interface) Deprecated
ZoneOfInterfaceChanged(s: zone, s: interface) Emitted when a zone an
interface
is part of has been changed tozone
.ZoneOfSourceChanged(s: zone, s: source) Emitted when a zone an
source
is part of has been changed tozone
.ZoneUpdated2(s: zone, a{sv}: settings) Emitted when a zone's settings are updated via org.fedoraproject.FirewallD1.zone.Methods.setZoneSettings2
org.fedoraproject.FirewallD1.policy
Operations in this interface allows one to get, add, remove and query runtime policy settings. For permanent settings see org.fedoraproject.FirewallD1.config.policy interface.Methods
getActivePolicies
() → a{sa{sas}}Return dictionary of currently active policies altogether with ingress zones and egress zones used in these policies. Active policies are policies, that have a binding to an active ingress zone and an active egress zone.
Return value is a dictionary where keys are policy names (s) and values are again dictionaries where keys are either 'ingress_zones' or 'egress_zones' and values are arrays of zone names (s).
getPolicies
() → asReturn array of names (s) of predefined policies known to current runtime environment. For list of policies known to permanent environment see org.fedoraproject.FirewallD1.config.Methods.listPolicies. The lists (of policies known to runtime and permanent environment) will contain same policies in most cases, but might differ for example if org.fedoraproject.FirewallD1.config.Methods.addPolicy has been called recently, but firewalld has not been reloaded since then.
getPolicySettings
(s:policy
) → a{sv}Return runtime settings of given
policy
. For getting permanent settings see org.fedoraproject.FirewallD1.config.policy.Methods.getSettings. Settings are a dictionary indexed by keywords. For possible keywords see org.fedoraproject.FirewallD1.config.Methods.addPolicy. If the value is empty it may be omitted.Possible errors: INVALID_POLICY
setPolicySettings
(s:policy
, a{sv}:settings
, i:timeout
)Set runtime settings of given
policy
. For setting permanent settings see org.fedoraproject.FirewallD1.config.policy.Methods.update. Settings are a dictionary indexed by keywords. For possible keywords see org.fedoraproject.FirewallD1.config.Methods.addPolicy. To zero a value pass an empty string or list. Some keywords are not available to modify in the runtime:description
,name
,priority
,target
,version
.Possible errors: INVALID_POLICY
Signals
ForwardPortAdded(s: policy, a{sv}: settings) Emitted when a policy's settings are updated via org.fedoraproject.FirewallD1.policy.Methods.setPolicySettings
org.fedoraproject.FirewallD1.config
Allows one to permanently add, remove and query zones, services and icmp types.Methods
addIPSet
(s: ipset, (ssssa{ss}as): settings) → oAdd
ipset
with givensettings
into permanent configuration. Settings are in format:version
,name
,description
,type
, dictionary ofoptions
and array ofentries
.
version (s)
: seeversion
attribute ofipset
tag in firewalld.ipset(5).name (s)
: seeshort
tag in firewalld.ipset(5).description (s)
: seedescription
tag in firewalld.ipset(5).type (s)
: seetype
attribute ofipset
tag in firewalld.ipset(5).options (a{ss})
: dictionary of {option : value} . Seeoptions
tag in firewalld.ipset(5).entries (as)
: array of entries, seeentry
tag in firewalld.ipset(5).
Possible errors: NAME_CONFLICT, INVALID_NAME, INVALID_TYPE
addIcmpType
(s: icmptype, (sssas): settings) → oAdd
icmptype
with givensettings
into permanent configuration. Settings are in format:version
,name
,description
, array ofdestinations
. Returns object path of the new icmp type.
version (s)
: seeversion
attribute oficmptype
tag in firewalld.icmptype(5).name (s)
: seeshort
tag in firewalld.icmptype(5).description (s)
: seedescription
tag in firewalld.icmptype(5).destinations (as)
: array, either empty or containing strings 'ipv4' or 'ipv6', seedestination
tag in firewalld.icmptype(5).
Possible errors: NAME_CONFLICT, INVALID_NAME, INVALID_TYPE
addService
(s: service, (sssa(ss)asa{ss}asa(ss)): settings) → oThis function is deprecated, use org.fedoraproject.FirewallD1.config.Methods.addService2 instead.
addService2
s: service, a{sv}: settings) → oAdd
service
with givensettings
into permanent configuration. Settings are a dictionary indexed by keywords. For the type of each value see below. To zero a value pass an empty string or list.
version (s)
: seeversion
attribute ofservice
tag in firewalld.service(5).name (s)
: seeshort
tag in firewalld.service(5).description (s)
: seedescription
tag in firewalld.service(5).ports (a(ss))
: array of port and protocol pairs. Seeport
tag in firewalld.service(5).module names (as)
: array of kernel netfilter helpers, seemodule
tag in firewalld.service(5).destinations (a{ss})
: dictionary of {IP family : IP address} where 'IP family' key can be either 'ipv4' or 'ipv6'. Seedestination
tag in firewalld.service(5).protocols (as)
: array of protocols, seeprotocol
tag in firewalld.service(5).source_ports (a(ss))
: array of port and protocol pairs. Seesource-port
tag in firewalld.service(5).includes (as)
: array of service includes, seeinclude
tag in firewalld.service(5).helpers (as)
: array of service helpers, seehelper
tag in firewalld.service(5).
Possible errors: NAME_CONFLICT, INVALID_NAME, INVALID_TYPE
addZone
(s: zone, (sssbsasa(ss)asba(ssss)asasasasa(ss)b): settings) → oThis function is deprecated, use org.fedoraproject.FirewallD1.config.Methods.addZone2 instead.
addZone2
(s: zone, a{sv}: settings) → oAdd
zone
with givensettings
into permanent configuration. Settings are a dictionary indexed by keywords. For the type of each value see below. To zero a value pass an empty string or list.
version (s)
: seeversion
attribute ofzone
tag in firewalld.zone(5).name (s)
: seeshort
tag in firewalld.zone(5).description (s)
: seedescription
tag in firewalld.zone(5).target (s)
: seetarget
attribute ofzone
tag in firewalld.zone(5).services (as)
: array of service names, seeservice
tag in firewalld.zone(5).ports (a(ss))
: array of port and protocol pairs. Seeport
tag in firewalld.zone(5).icmp_blocks (as)
: array of icmp-blocks. Seeicmp-block
tag in firewalld.zone(5).masquerade (b)
: seemasquerade
tag in firewalld.zone(5).forward_ports (a(ssss))
: array of (port, protocol, to-port, to-addr). Seeforward-port
tag in firewalld.zone(5).interfaces (as)
: array of interfaces. Seeinterface
tag in firewalld.zone(5).sources (as)
: array of source addresses. Seesource
tag in firewalld.zone(5).rules_str (as)
: array of rich-language rules. Seerule
tag in firewalld.zone(5).protocols (as)
: array of protocols, seeprotocol
tag in firewalld.zone(5).source_ports (a(ss))
: array of port and protocol pairs. Seesource-port
tag in firewalld.zone(5).icmp_block_inversion (b)
: seeicmp-block-inversion
tag in firewalld.zone(5).forward (b)
: seeforward
tag in firewalld.zone(5).
Possible errors: NAME_CONFLICT, INVALID_NAME, INVALID_TYPE
addPolicy
(s: policy, a{sv}: settings) → oAdd
policy
with givensettings
into permanent configuration. Settings are a dictionary indexed by keywords. For the type of each value see below. If a keyword is omitted the default value will be used.
description (s)
: seedescription
tag in firewalld.policy(5).egress_zones as
: array of zone names. Seeegress-zone
tag in firewalld.policy(5).forward_ports (a(ssss))
: array of (port, protocol, to-port, to-addr). Seeforward-port
tag in firewalld.policy(5).icmp_blocks (as)
: array of icmp-blocks. Seeicmp-block
tag in firewalld.policy(5).ingress_zones as
: array of zone names. Seeingress-zone
tag in firewalld.policy(5).masquerade (b)
: seemasquerade
tag in firewalld.policy(5).ports (a(ss))
: array of port and protocol pairs. Seeport
tag in firewalld.policy(5).priority (i)
: seepriority
tag in firewalld.policy(5).protocols (as)
: array of protocols, seeprotocol
tag in firewalld.policy(5).rich_rules (as)
: array of rich-language rules. Seerule
tag in firewalld.policy(5).services (as)
: array of service names, seeservice
tag in firewalld.policy(5).short (s)
: seeshort
tag in firewalld.policy(5).source_ports (a(ss))
: array of port and protocol pairs. Seesource-port
tag in firewalld.policy(5).target (s)
: seetarget
attribute ofpolicy
tag in firewalld.policy(5).version (s)
: seeversion
attribute ofpolicy
tag in firewalld.policy(5).
Possible errors: NAME_CONFLICT, INVALID_NAME, INVALID_TYPE
getHelperByName
(s: helper) → oReturn object path (permanent configuration) of
helper
with given name.Possible errors: INVALID_HELPER
getHelperNames
() → asReturn list of
helper
names (permanent configuration).getIPSetByName
(s: ipset) → oReturn object path (permanent configuration) of
ipset
with given name.Possible errors: INVALID_IPSET
getIPSetNames
() → asReturn list of
ipset
names (permanent configuration).getIcmpTypeByName
(s: icmptype) → oReturn object path (permanent configuration) of
icmptype
with given name.Possible errors: INVALID_ICMPTYPE
getIcmpTypeNames
() → asReturn list of
icmptype
names (permanent configuration).getServiceByName
(s: service) → oReturn object path (permanent configuration) of
service
with given name.Possible errors: INVALID_SERVICE
getServiceNames
() → asReturn list of
service
names (permanent configuration).getZoneByName
(s: zone) → oReturn object path (permanent configuration) of
zone
with given name.Possible errors: INVALID_ZONE
getZoneNames
() → asReturn list of
zone
names (permanent configuration) of.getZoneOfInterface
(s: iface) → sReturn name of zone the
iface
is bound to or empty string.getZoneOfSource
(s: source) → sReturn name of zone the
source
is bound to or empty string.getPolicyByName
(s: policy) → oReturn object path (permanent configuration) of
policy
with given name.Possible errors: INVALID_POLICY
getPolicyNames
() → asReturn list of
policy
names (permanent configuration).listHelpers
() → aoReturn array of object paths (o) of helper in permanent configuration. For runtime configuration see org.fedoraproject.FirewallD1.Methods.getHelpers.
listIPSets
() → aoReturn array of object paths (o) of ipset in permanent configuration. For runtime configuration see org.fedoraproject.FirewallD1.ipset.Methods.getIPSets.
listIcmpTypes
() → aoReturn array of object paths (o) of icmp types in permanent configuration. For runtime configuration see org.fedoraproject.FirewallD1.Methods.listIcmpTypes.
listServices
() → aoReturn array of objects paths (o) of services in permanent configuration. For runtime configuration see org.fedoraproject.FirewallD1.Methods.listServices.
listZones
() → aoList object paths of zones known to permanent environment. For list of zones known to runtime environment see org.fedoraproject.FirewallD1.zone.Methods.getZones. The lists (of zones known to runtime and permanent environment) will contain same zones in most cases, but might differ for example if org.fedoraproject.FirewallD1.config.Methods.addZone has been called recently, but firewalld has not been reloaded since then.
listPolicies
() → aoList object paths of policies known to permanent environment. For list of policies known to runtime environment see org.fedoraproject.FirewallD1.policy.Methods.getPolicies. The lists (of policies known to runtime and permanent environment) will contain same policies in most cases, but might differ for example if org.fedoraproject.FirewallD1.config.Methods.addPolicy has been called recently, but firewalld has not been reloaded since then.
Signals
HelperAdded(s: helper) Emitted when
helper
has been added.IPSetAdded(s: ipset) Emitted when
ipset
has been added.IcmpTypeAdded(s: icmptype) Emitted when
icmptype
has been added.ServiceAdded(s: service) Emitted when
service
has been added.ZoneAdded(s: zone) Emitted when
zone
has been added.Properties
AllowZoneDrifting
- s - (rw)Deprecated. Getting this value always returns "no". Setting this value is ignored.
AutomaticHelpers - s - (rw) Deprecated. Getting this value always returns "no". Setting this value is ignored.
CleanupModulesOnExit - s - (rw) Setting this option to yes or true unloads all firewall-related kernel modules when firewalld is stopped.
CleanupOnExit - s - (rw) If firewalld stops, it cleans up all firewall rules. Setting this option to no or false leaves the current firewall rules untouched.
DefaultZone - s - (ro) Default zone for connections or interfaces if the zone is not selected or specified by NetworkManager, initscripts or command line tool.
FirewallBackend - s - (rw) Selects the firewalld backend for all rules except the direct interface. Valid options are; nftables, iptables. Default in nftables.
Note: The iptables backend is deprecated. It will be removed in a future release.
FlushAllOnReload - s - (rw) Flush all runtime rules on a reload. Valid options are; yes, no.
IPv6_rpfilter
- s - (rw)Indicates whether the reverse path filter test on a packet for IPv6 is enabled. If a reply to the packet would be sent via the same interface that the packet arrived on, the packet will match and be accepted, otherwise dropped.
IndividualCalls
- s - (ro)Indicates whether individual calls combined -restore calls are used. If enabled, this increases the time that is needed to apply changes and to start the daemon, but is good for debugging.
Lockdown - s - (rw) If this property is enabled, firewall changes with the D-Bus interface will be limited to applications that are listed in the lockdown whitelist.
LogDenied - s - (rw) If LogDenied is enabled, then logging rules are added right before reject and drop rules in the INPUT, FORWARD and OUTPUT chains for the default rules and also final reject and drop rules in zones. Possible values are:
all
,unicast
,broadcast
,multicast
andoff
.MinimalMark - i - (rw) Deprecated. This option is ignored and no longer used. Marks are no longer used internally.
RFC3964_IPv4 - s - (rw) As per RFC 3964, filter IPv6 traffic with 6to4 destination addresses that correspond to IPv4 addresses that should not be routed over the public internet. Valid options are; yes, no.
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).Interface for permanent direct configuration, see also firewalld.direct(5). For runtime direct configuration see org.fedoraproject.FirewallD1.direct interface.Methods
addChain
(s: ipv, s: table, s: chain) → NothingAdd a new
chain
totable
foripv
being eitheripv4
(iptables) oripv6
(ip6tables) oreb
(ebtables). Make sure there's no other chain with this name already. There already exist basic chains to use with direct methods, for exampleINPUT_direct
chain. These chains are jumped into before chains for zones, i.e. every rule put intoINPUT_direct
will be checked before rules in zones. For runtime operation see org.fedoraproject.FirewallD1.direct.Methods.addChain.Possible errors: INVALID_IPV, INVALID_TABLE, ALREADY_ENABLED
addPassthrough
(s: ipv, as: args) → NothingAdd a passthrough rule with the arguments
args
foripv
being eitheripv4
(iptables) oripv6
(ip6tables) oreb
(ebtables). For runtime operation see org.fedoraproject.FirewallD1.direct.Methods.addPassthrough.Possible errors: INVALID_IPV, ALREADY_ENABLED
addRule
(s: ipv, s: table, s: chain, i: priority, as: args) → NothingAdd a rule with the arguments
args
tochain
intable
withpriority
foripv
being eitheripv4
(iptables) oripv6
(ip6tables) oreb
(ebtables). The priority is used to order rules. Priority 0 means add rule on top of the chain, with a higher priority the rule will be added further down. Rules with the same priority are on the same level and the order of these rules is not fixed and may change. If you want to make sure that a rule will be added after another one, use a low priority for the first and a higher for the following. For runtime operation see org.fedoraproject.FirewallD1.direct.Methods.addRule.Possible errors: INVALID_IPV, INVALID_TABLE, ALREADY_ENABLED
getAllChains
() → a(sss)Get all chains added to all tables in format: ipv, table, chain. This concerns only chains previously added with
addChain
. Return value is a array of (ipv
,table
,chain
). For runtime operation see org.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.
getAllPassthroughs
() → a(sas)Get all passthrough rules added in all ipv types in format: ipv, rule. This concerns only rules previously added with
addPassthrough
. Return value is a array of (ipv
, array ofarguments
). For runtime operation see org.fedoraproject.FirewallD1.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)Get all rules added to all chains in all tables in format: ipv, table, chain, priority, rule. This concerns only rules previously added with
addRule
. Return value is a array of (ipv
,table
,chain
,priority
, array ofarguments
). For runtime operation see org.fedoraproject.FirewallD1.direct.Methods.getAllRules.
ipv (s)
: eitheripv4
(iptables) oripv6
(ip6tables) oreb
(ebtables).table (s)
: one offilter
,mangle
,nat
,raw
,security
chain (s)
: name of a chain.priority (i)
: used to order rules.arguments (as)
: array of commands, parameters and other iptables/ip6tables/ebtables command line options.
getChains
(s: ipv, s: table) → asReturn an array of chains (s) added to
table
foripv
being eitheripv4
(iptables) oripv6
(ip6tables) oreb
(ebtables). This concerns only chains previously added withaddChain
. For runtime operation see org.fedoraproject.FirewallD1.direct.Methods.getChains.Possible errors: INVALID_IPV, INVALID_TABLE
getPassthroughs
(s: ipv) → aasGet tracked passthrough rules added in either
ipv4
(iptables) oripv6
(ip6tables) oreb
(ebtables). This concerns only rules previously added withaddPassthrough
. Return value is a array of (array ofarguments
). For runtime operation see org.fedoraproject.FirewallD1.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)Get all rules added to
chain
intable
foripv
being eitheripv4
(iptables) oripv6
(ip6tables) oreb
(ebtables). This concerns only rules previously added withaddRule
. Return value is a array of (priority
, array ofarguments
). For runtime operation see org.fedoraproject.FirewallD1.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
getSettings
() → (a(sss)a(sssias)a(sas))Get settings of permanent direct configuration in format: array of
chains
, array ofrules
, array ofpassthroughs
.
chains (a(sss))
: array of (ipv
,table
,chain
), see 'chain' in firewalld.direct(5).rules (a(sssias))
: array of (ipv
,table
,chain
,priority
, array ofarguments
), see 'rule' in firewalld.direct(5).passthroughs (a(sas))
: array of (ipv
, array ofarguments
), see passthrough in firewalld.direct(5).
queryChain
(s: ipv, s: table, s: chain) → bReturn whether a
chain
exists intable
foripv
being eitheripv4
(iptables) oripv6
(ip6tables) oreb
(ebtables). This concerns only chains previously added withaddChain
. For runtime operation see org.fedoraproject.FirewallD1.direct.Methods.queryChain.Possible errors: INVALID_IPV, INVALID_TABLE
queryPassthrough
(s: ipv, as: args) → bReturn whether a tracked passthrough rule with the arguments
args
exists foripv
being eitheripv4
(iptables) oripv6
(ip6tables) oreb
(ebtables). This concerns only rules previously added withaddPassthrough
. For runtime operation see org.fedoraproject.FirewallD1.direct.Methods.queryPassthrough.Possible errors: INVALID_IPV
queryRule
(s: ipv, s: table, s: chain, i: priority, as: args) → bReturn whether a rule with
priority
and the argumentsargs
exists inchain
intable
foripv
being eitheripv4
(iptables) oripv6
(ip6tables) oreb
(ebtables). This concerns only rules previously added withaddRule
. For runtime operation see org.fedoraproject.FirewallD1.direct.Methods.queryRule.Possible errors: INVALID_IPV, INVALID_TABLE
removeChain
(s: ipv, s: table, s: chain) → NothingRemove a
chain
fromtable
foripv
being eitheripv4
(iptables) oripv6
(ip6tables) oreb
(ebtables). Only chains previously added withaddChain
can be removed this way. For runtime operation see org.fedoraproject.FirewallD1.direct.Methods.removeChain.Possible errors: INVALID_IPV, INVALID_TABLE, NOT_ENABLED
removePassthrough
(s: ipv, as: args) → NothingRemove a passthrough rule with arguments
args
foripv
being eitheripv4
(iptables) oripv6
(ip6tables) oreb
(ebtables). Only rules previously added withaddPassthrough
can be removed this way. For runtime operation see org.fedoraproject.FirewallD1.direct.Methods.removePassthrough.Possible errors: INVALID_IPV, NOT_ENABLED
removeRule
(s: ipv, s: table, s: chain, i: priority, as: args) → NothingRemove a rule with
priority
and argumentsargs
fromchain
intable
foripv
being eitheripv4
(iptables) oripv6
(ip6tables) oreb
(ebtables). Only rules previously added withaddRule
can be removed this way. For runtime operation see org.fedoraproject.FirewallD1.direct.Methods.removeRule.Possible errors: INVALID_IPV, INVALID_TABLE, NOT_ENABLED
removeRules
(s: ipv, s: table, s: chain) → NothingRemove all rules from
chain
intable
foripv
being eitheripv4
(iptables) oripv6
(ip6tables) oreb
(ebtables). This concerns only rules previously added withaddRule
. For runtime operation see org.fedoraproject.FirewallD1.direct.Methods.removeRules.Possible errors: INVALID_IPV, INVALID_TABLE
update
((a(sss)a(sssias)a(sas)): settings) → NothingUpdate permanent direct configuration with given
settings
. Settings are in format: array ofchains
, array ofrules
, array ofpassthroughs
.
chains (a(sss))
: array of (ipv
,table
,chain
), see 'chain' in firewalld.direct(5).rules (a(sssias))
: array of (ipv
,table
,chain
,priority
, array ofarguments
), see 'rule' in firewalld.direct(5).passthroughs (a(sas))
: array of (ipv
, array ofarguments
), see passthrough in firewalld.direct(5).
Possible errors: INVALID_TYPE
org.fedoraproject.FirewallD1.config.policies
Interface for permanent lockdown-whitelist configuration, see also firewalld.lockdown-whitelist(5). For runtime configuration see org.fedoraproject.FirewallD1.policies interface.Methods
addLockdownWhitelistCommand
(s: command) → NothingAdd
command
to whitelist. Seecommand
option in firewalld.lockdown-whitelist(5). For runtime operation see org.fedoraproject.FirewallD1.policies.Methods.addLockdownWhitelistCommand.Possible errors: ALREADY_ENABLED, INVALID_TYPE
addLockdownWhitelistContext
(s: context) → NothingAdd
context
to whitelist. Seeselinux
option in firewalld.lockdown-whitelist(5). For runtime operation see org.fedoraproject.FirewallD1.policies.Methods.addLockdownWhitelistContext.Possible errors: ALREADY_ENABLED, INVALID_TYPE
addLockdownWhitelistUid
(i: uid) → NothingAdd user id
uid
to whitelist. Seeuser
option in firewalld.lockdown-whitelist(5). For runtime operation see org.fedoraproject.FirewallD1.policies.Methods.addLockdownWhitelistUid.Possible errors: ALREADY_ENABLED, INVALID_TYPE
addLockdownWhitelistUser
(s: user) → NothingAdd
user
name to whitelist. Seeuser
option in firewalld.lockdown-whitelist(5). For runtime operation see org.fedoraproject.FirewallD1.policies.Methods.addLockdownWhitelistUser.Possible errors: ALREADY_ENABLED, INVALID_TYPE
getLockdownWhitelist
() → (asasasai)Get settings of permanent lockdown-whitelist configuration in format:
commands
,selinux contexts
,users
,uids
commands (as)
: seecommand
option in firewalld.lockdown-whitelist(5).selinux contexts (as)
: seeselinux
option in firewalld.lockdown-whitelist(5).users (as)
: seename
attribute ofuser
option in firewalld.lockdown-whitelist(5).uids (ai)
: seeid
attribute ofuser
option in firewalld.lockdown-whitelist(5).
getLockdownWhitelistCommands
() → asList all command lines (s) that are on whitelist. For runtime operation see org.fedoraproject.FirewallD1.policies.Methods.getLockdownWhitelistCommands.
getLockdownWhitelistContexts
() → asList all contexts (s) that are on whitelist. For runtime operation see org.fedoraproject.FirewallD1.policies.Methods.getLockdownWhitelistContexts.
getLockdownWhitelistUids
() → aiList all user ids (i) that are on whitelist. For runtime operation see org.fedoraproject.FirewallD1.policies.Methods.getLockdownWhitelistUids.
getLockdownWhitelistUsers
() → asList all users (s) that are on whitelist. For runtime operation see org.fedoraproject.FirewallD1.policies.Methods.getLockdownWhitelistUsers.
queryLockdownWhitelistCommand
(s: command) → bQuery whether
command
is on whitelist. For runtime operation see org.fedoraproject.FirewallD1.policies.Methods.queryLockdownWhitelistCommand.queryLockdownWhitelistContext
(s: context) → bQuery whether
context
is on whitelist. For runtime operation see org.fedoraproject.FirewallD1.policies.Methods.queryLockdownWhitelistContext.queryLockdownWhitelistUid
(i: uid) → bQuery whether user id
uid
is on whitelist. For runtime operation see org.fedoraproject.FirewallD1.policies.Methods.queryLockdownWhitelistUid.queryLockdownWhitelistUser
(s: user) → bQuery whether
user
is on whitelist. For runtime operation see org.fedoraproject.FirewallD1.policies.Methods.queryLockdownWhitelistUser.removeLockdownWhitelistCommand
(s: command) → NothingRemove
command
from whitelist. For runtime operation see org.fedoraproject.FirewallD1.policies.Methods.removeLockdownWhitelistCommand.Possible errors: NOT_ENABLED
removeLockdownWhitelistContext
(s: context) → NothingRemove
context
from whitelist. For runtime operation see org.fedoraproject.FirewallD1.policies.Methods.removeLockdownWhitelistContext.Possible errors: NOT_ENABLED
removeLockdownWhitelistUid
(i: uid) → NothingRemove user id
uid
from whitelist. For runtime operation see org.fedoraproject.FirewallD1.policies.Methods.removeLockdownWhitelistUid.Possible errors: NOT_ENABLED
removeLockdownWhitelistUser
(s: user) → NothingRemove
user
from whitelist. For runtime operation see org.fedoraproject.FirewallD1.policies.Methods.removeLockdownWhitelistUser.Possible errors: NOT_ENABLED
setLockdownWhitelist
((asasasai): settings) → NothingSet permanent lockdown-whitelist configuration to
settings
. Settings are in format:commands
,selinux contexts
,users
,uids
commands (as)
: seecommand
option in firewalld.lockdown-whitelist(5).selinux contexts (as)
: seeselinux
option in firewalld.lockdown-whitelist(5).users (as)
: seename
attribute ofuser
option in firewalld.lockdown-whitelist(5).uids (ai)
: seeid
attribute ofuser
option in firewalld.lockdown-whitelist(5).
Possible errors: INVALID_TYPE
org.fedoraproject.FirewallD1.config.ipset
Interface for permanent ipset configuration, see also firewalld.ipset(5).Methods
addEntry
(s: entry) → NothingPermanently add
entry
to list of entries of ipset. Seeentry
tag in firewalld.ipset(5). For runtime operation see org.fedoraproject.FirewallD1.ipset.Methods.addEntry.Possible errors: ALREADY_ENABLED
addOption
(s: key, s: value) → NothingPermanently add (
key
,value
) to the ipset. Seeoption
tag in firewalld.ipset(5).Possible errors: ALREADY_ENABLED
getDescription
() → sGet description of ipset. See
description
tag in firewalld.ipset(5).getEntries
() → asGet list of entries added to ipset. See
entry
tag in firewalld.ipset(5). For runtime operation see org.fedoraproject.FirewallD1.ipset.Methods.getEntries.Possible errors: IPSET_WITH_TIMEOUT
getOptions
() → a{ss}Get dictionary of
options
set for ipset. Seeoption
tag in firewalld.ipset(5).getSettings
() → (ssssa{ss}as)Return permanent settings of the ipset. For getting runtime settings see org.fedoraproject.FirewallD1.ipset.Methods.getIPSetSettings. Settings are in format:
version
,name
,description
,type
, dictionary ofoptions
and array ofentries
.
version (s)
: seeversion
attribute ofipset
tag in firewalld.ipset(5).name (s)
: seeshort
tag in firewalld.ipset(5).description (s)
: seedescription
tag in firewalld.ipset(5).type (s)
: seetype
attribute ofipset
tag in firewalld.ipset(5).options (a{ss})
: dictionary of {option : value} . Seeoptions
tag in firewalld.ipset(5).entries (as)
: array of entries, seeentry
tag in firewalld.ipset(5).
getShort
() → sGet name of ipset. See
short
tag in firewalld.ipset(5).getType
() → sGet type of ipset. See
type
attribute ofipset
tag in firewalld.ipset(5).getVersion
() → sGet version of ipset. See
version
attribute ofipset
tag in firewalld.ipset(5).loadDefaults
() → NothingLoad default settings for built-in ipset.
Possible errors: NO_DEFAULTS
queryEntry
(s: entry) → bReturn whether
entry
has been added toipset
. For runtime operation see org.fedoraproject.FirewallD1.ipset.Methods.queryEntry.queryOption
(s: key, s: value) → bReturn whether (
key
,value
) has been added to options of theipset
.remove
() → NothingRemove not built-in ipset.
Possible errors: BUILTIN_IPSET
removeEntry
(s: entry) → NothingPermanently remove
entry
from ipset. Seeentry
tag in firewalld.ipset(5). For runtime operation see org.fedoraproject.FirewallD1.ipset.Methods.removeEntry.Possible errors: NOT_ENABLED
removeOption
(s: key) → NothingPermanently remove
key
from the ipset. Seeoption
tag in firewalld.ipset(5).Possible errors: NOT_ENABLED
rename
(s: name) → NothingRename not built-in ipset to
name
.Possible errors: BUILTIN_IPSET
setDescription
(s: description) → NothingPermanently set description of ipset to
description
. Seedescription
tag in firewalld.ipset(5).setEntries
(as: entries) → NothingPermanently set list of entries to
entries
. Seeentry
tag in firewalld.ipset(5).setOptions
(a{ss}: options) → NothingPermanently set dict of options to
options
. Seeoption
tag in firewalld.ipset(5).setShort
(s: short) → NothingPermanently set name of ipset to
short
. Seeshort
tag in firewalld.ipset(5).setType
(s: ipset_type) → NothingPermanently set type of ipset to
ipset_type
. Seetype
attribute ofipset
tag in firewalld.ipset(5).setVersion
(s: version) → NothingPermanently set version of ipset to
version
. Seeversion
attribute ofipset
tag in firewalld.ipset(5).update
((ssssa{ss}as): settings) → NothingUpdate settings of ipset to
settings
. Settings are in format:version
,name
,description
,type
, dictionary ofoptions
and array ofentries
.
version (s)
: seeversion
attribute ofipset
tag in firewalld.ipset(5).name (s)
: seeshort
tag in firewalld.ipset(5).description (s)
: seedescription
tag in firewalld.ipset(5).type (s)
: seetype
attribute ofipset
tag in firewalld.ipset(5).options (a{ss})
: dictionary of {option : value} . Seeoptions
tag in firewalld.ipset(5).entries (as)
: array of entries, seeentry
tag in firewalld.ipset(5).
Possible errors: INVALID_TYPE
Properties
builtin - b - (ro) True if ipset is build-in, false else.
default - b - (ro) True if build-in ipset has default settings. False if it has been modified. Always False for not build-in ipsets.
filename - s - (ro) Name (including .xml extension) of file where the configuration is stored.
name - s - (ro) Name of ipset.
path - s - (ro) Path to directory where the ipset configuration is stored. Should be either /usr/lib/firewalld/ipsets or /etc/firewalld/ipsets.
org.fedoraproject.FirewallD1.config.zone
Interface for permanent zone configuration, see also firewalld.zone(5).Methods
addForwardPort
(s: port, s: protocol, s: toport, s: toaddr) → NothingPermanently add (
port
,protocol
,toport
,toaddr
) to list of forward ports of zone. Seeforward-port
tag in firewalld.zone(5). For runtime operation see org.fedoraproject.FirewallD1.zone.Methods.addForwardPort.Possible errors: ALREADY_ENABLED
addIcmpBlock
(s: icmptype) → NothingPermanently add
icmptype
to list of icmp types blocked in zone. Seeicmp-block
tag in firewalld.zone(5). For runtime operation see org.fedoraproject.FirewallD1.zone.Methods.addIcmpBlock.Possible errors: ALREADY_ENABLED
addIcmpBlock
(s: icmptype) → NothingPermanently add icmp block inversion to zone. See
icmp-block-inversion
tag in firewalld.zone(5). For runtime operation see org.fedoraproject.FirewallD1.zone.Methods.addIcmpBlockInversion.Possible errors: ALREADY_ENABLED
addInterface
(s: interface) → NothingPermanently add
interface
to list of interfaces bound to zone. Seeinterface
tag in firewalld.zone(5). For runtime operation see org.fedoraproject.FirewallD1.zone.Methods.addInterface.Possible errors: ALREADY_ENABLED
addMasquerade
() → NothingPermanently enable masquerading in zone. See
masquerade
tag in firewalld.zone(5). For runtime operation see org.fedoraproject.FirewallD1.zone.Methods.addMasquerade.Possible errors: ALREADY_ENABLED
addPort
(s: port, s: protocol) → NothingPermanently add (
port
,protocol
) to list of ports of zone. Seeport
tag in firewalld.zone(5). For runtime operation see org.fedoraproject.FirewallD1.zone.Methods.addPort.Possible errors: ALREADY_ENABLED
addProtocol
(s: protocol) → NothingPermanently add protocol into
zone
. The protocol can be any protocol supported by the system. Please have a look at/etc/protocols
for supported protocols. For runtime operation see org.fedoraproject.FirewallD1.zone.Methods.addProtocol.Possible errors: INVALID_PROTOCOL, ALREADY_ENABLED
addRichRule
(s: rule) → NothingPermanently add
rule
to list of rich-language rules in zone. Seerule
tag in firewalld.zone(5). For runtime operation see org.fedoraproject.FirewallD1.zone.Methods.addRichRule.Possible errors: ALREADY_ENABLED
addService
(s: service) → NothingPermanently add
service
to list of services used in zone. Seeservice
tag in firewalld.zone(5). For runtime operation see org.fedoraproject.FirewallD1.zone.Methods.addService.Possible errors: ALREADY_ENABLED
addSource
(s: source) → NothingPermanently add
source
to list of source addresses bound to zone. Seesource
tag in firewalld.zone(5). For runtime operation see org.fedoraproject.FirewallD1.zone.Methods.addSource.Possible errors: ALREADY_ENABLED
addSourcePort
(s: port, s: protocol) → NothingPermanently add (
port
,protocol
) to list of source ports of zone. Seesource-port
tag in firewalld.zone(5). For runtime operation see org.fedoraproject.FirewallD1.zone.Methods.addSourcePort.Possible errors: ALREADY_ENABLED
getDescription
() → sGet description of zone. See
description
tag in firewalld.zone(5).getForwardPorts
() → a(ssss)Get list of (
port
,protocol
,toport
,toaddr
) defined in zone. Seeforward-port
tag in firewalld.zone(5). For runtime operation see org.fedoraproject.FirewallD1.zone.Methods.getForwardPorts.getIcmpBlockInversion
() → bGet icmp block inversion flag of zone. See
icmp-block-inversion
tag in firewalld.zone(5).getIcmpBlocks
() → asGet list of icmp type names blocked in zone. See
icmp-block
tag in firewalld.zone(5). For runtime operation see org.fedoraproject.FirewallD1.zone.Methods.getIcmpBlocks.getInterfaces
() → asGet list of interfaces bound to zone. See
interface
tag in firewalld.zone(5). For runtime operation see org.fedoraproject.FirewallD1.zone.Methods.getInterfaces.getMasquerade
() → bReturn whether
masquerade
is enabled in zone. This is the same as queryMasquerade() method. Seemasquerade
tag in firewalld.zone(5).getPorts
() → a(ss)Get list of (
port
,protocol
) defined in zone. Seeport
tag in firewalld.zone(5). For runtime operation see org.fedoraproject.FirewallD1.zone.Methods.getPorts.getProtocols
() → asReturn array of protocols (s) previously enabled in
zone
. For getting runtime settings see org.fedoraproject.FirewallD1.zone.Methods.getProtocols.getRichRules
() → asGet list of rich-language rules in zone. See
rule
tag in firewalld.zone(5). For runtime operation see org.fedoraproject.FirewallD1.zone.Methods.getRichRules.getServices
() → asGet list of service names used in zone. See
service
tag in firewalld.zone(5). For runtime operation see org.fedoraproject.FirewallD1.zone.Methods.getServices.getSettings
() → (sssbsasa(ss)asba(ssss)asasasasa(ss)b)This function is deprecated, use org.fedoraproject.FirewallD1.config.zone.Methods.getSettings2 instead.
getSettings2
() → a{sv}Return permanent settings of given
zone
. For getting runtime settings see org.fedoraproject.FirewallD1.zone.Methods.getZoneSettings2. Settings are a dictionary indexed by keywords. For the type of each value see below. If the value is empty it may be omitted.
version (s)
: seeversion
attribute ofzone
tag in firewalld.zone(5).name (s)
: seeshort
tag in firewalld.zone(5).description (s)
: seedescription
tag in firewalld.zone(5).target (s)
: seetarget
attribute ofzone
tag in firewalld.zone(5).services (as)
: array of service names, seeservice
tag in firewalld.zone(5).ports (a(ss))
: array of port and protocol pairs. Seeport
tag in firewalld.zone(5).icmp_blocks (as)
: array of icmp-blocks. Seeicmp-block
tag in firewalld.zone(5).masquerade (b)
: seemasquerade
tag in firewalld.zone(5).forward_ports (a(ssss))
: array of (port, protocol, to-port, to-addr). Seeforward-port
tag in firewalld.zone(5).interfaces (as)
: array of interfaces. Seeinterface
tag in firewalld.zone(5).sources (as)
: array of source addresses. Seesource
tag in firewalld.zone(5).rules_str (as)
: array of rich-language rules. Seerule
tag in firewalld.zone(5).protocols (as)
: array of protocols, seeprotocol
tag in firewalld.zone(5).source_ports (a(ss))
: array of port and protocol pairs. Seesource-port
tag in firewalld.zone(5).icmp_block_inversion (b)
: seeicmp-block-inversion
tag in firewalld.zone(5).forward (b)
: seeforward
tag in firewalld.zone(5).
getShort
() → sGet name of zone. See
short
tag in firewalld.zone(5).getSourcePorts
() → a(ss)Get list of (
port
,protocol
) defined in zone. Seesource-port
tag in firewalld.zone(5). For runtime operation see org.fedoraproject.FirewallD1.zone.Methods.getSourcePorts.getSources
() → asGet list of source addresses bound to zone. See
source
tag in firewalld.zone(5). For runtime operation see org.fedoraproject.FirewallD1.zone.Methods.getSources.getTarget
() → sGet target of zone. See
target
attribute ofzone
tag in firewalld.zone(5).getVersion
() → sGet version of zone. See
version
attribute ofzone
tag in firewalld.zone(5).loadDefaults
() → NothingLoad default settings for built-in zone.
Possible errors: NO_DEFAULTS
queryForwardPort
(s: port, s: protocol, s: toport, s: toaddr) → bReturn whether (
port
,protocol
,toport
,toaddr
) is in list of forward ports of zone. Seeforward-port
tag in firewalld.zone(5). For runtime operation see org.fedoraproject.FirewallD1.zone.Methods.queryForwardPort.queryIcmpBlock
(s: icmptype) → bReturn whether
icmptype
is in list of icmp types blocked in zone. Seeicmp-block
tag in firewalld.zone(5). For runtime operation see org.fedoraproject.FirewallD1.zone.Methods.queryIcmpBlock.queryIcmpBlockInversion
() → bReturn whether
icmp block inversion
is in enabled in zone. Seeicmp-block-inversion
tag in firewalld.zone(5). For runtime operation see org.fedoraproject.FirewallD1.zone.Methods.queryIcmpBlockInversion.queryInterface
(s: interface) → bReturn whether
interface
is in list of interfaces bound to zone. Seeinterface
tag in firewalld.zone(5). For runtime operation see org.fedoraproject.FirewallD1.zone.Methods.queryInterface.queryMasquerade
() → bReturn whether
masquerade
is enabled in zone. This is the same as getMasquerade() method. Seemasquerade
tag in firewalld.zone(5). For runtime operation see org.fedoraproject.FirewallD1.zone.Methods.queryMasquerade.queryPort
(s: port, s: protocol) → bReturn whether (
port
,protocol
) is in list of ports of zone. Seeport
tag in firewalld.zone(5). For runtime operation see org.fedoraproject.FirewallD1.zone.Methods.queryPort.queryProtocol
(s: protocol) → bReturn whether
protocol
has been added inzone
. For runtime operation see org.fedoraproject.FirewallD1.zone.Methods.queryProtocol.Possible errors: INVALID_PROTOCOL
queryRichRule
(s: rule) → bReturn whether
rule
is in list of rich-language rules in zone. Seerule
tag in firewalld.zone(5). For runtime operation see org.fedoraproject.FirewallD1.zone.Methods.queryRichRule.queryService
(s: service) → bReturn whether
service
is in list of services used in zone. Seeservice
tag in firewalld.zone(5). For runtime operation see org.fedoraproject.FirewallD1.zone.Methods.queryService.querySource
(s: source) → bReturn whether
source
is in list of source addresses bound to zone. Seesource
tag in firewalld.zone(5). For runtime operation see org.fedoraproject.FirewallD1.zone.Methods.querySource.querySourcePort
(s: port, s: protocol) → bReturn whether (
port
,protocol
) is in list of source ports of zone. Seesource-port
tag in firewalld.zone(5). For runtime operation see org.fedoraproject.FirewallD1.zone.Methods.querySourcePort.remove
() → NothingRemove not built-in zone.
Possible errors: BUILTIN_ZONE
removeForwardPort
(s: port, s: protocol, s: toport, s: toaddr) → NothingPermanently remove (
port
,protocol
,toport
,toaddr
) from list of forward ports of zone. Seeforward-port
tag in firewalld.zone(5). For runtime operation see org.fedoraproject.FirewallD1.zone.Methods.removeForwardPort.Possible errors: NOT_ENABLED
removeIcmpBlock
(s: icmptype) → NothingPermanently remove
icmptype
from list of icmp types blocked in zone. Seeicmp-block
tag in firewalld.zone(5). For runtime operation see org.fedoraproject.FirewallD1.zone.Methods.removeIcmpBlock.Possible errors: NOT_ENABLED
removeIcmpBlockInversion
() → NothingPermanently remove
icmp block inversion
from the zone. Seeicmp-block-inversion
tag in firewalld.zone(5). For runtime operation see org.fedoraproject.FirewallD1.zone.Methods.removeIcmpBlockInversion.Possible errors: NOT_ENABLED
removeInterface
(s: interface) → NothingPermanently remove
interface
from list of interfaces bound to zone. Seeinterface
tag in firewalld.zone(5). For runtime operation see org.fedoraproject.FirewallD1.zone.Methods.removeInterface.Possible errors: NOT_ENABLED
removeMasquerade
() → NothingPermanently disable masquerading in zone. See
masquerade
tag in firewalld.zone(5). For runtime operation see org.fedoraproject.FirewallD1.zone.Methods.removeMasquerade.Possible errors: NOT_ENABLED
removePort
(s: port, s: protocol) → NothingPermanently remove (
port
,protocol
) from list of ports of zone. Seeport
tag in firewalld.zone(5). For runtime operation see org.fedoraproject.FirewallD1.zone.Methods.removePort.Possible errors: NOT_ENABLED
removeProtocol
(s: protocol) → NothingPermanently remove protocol from
zone
. For runtime operation see org.fedoraproject.FirewallD1.zone.Methods.removeProtocol.Possible errors: INVALID_PROTOCOL, NOT_ENABLED
removeRichRule
(s: rule) → NothingPermanently remove
rule
from list of rich-language rules in zone. Seerule
tag in firewalld.zone(5). For runtime operation see org.fedoraproject.FirewallD1.zone.Methods.removeRichRule.Possible errors: NOT_ENABLED
removeService
(s: service) → NothingPermanently remove
service
from list of services used in zone. Seeservice
tag in firewalld.zone(5). For runtime operation see org.fedoraproject.FirewallD1.zone.Methods.removeService.Possible errors: NOT_ENABLED
removeSource
(s: source) → NothingPermanently remove
source
from list of source addresses bound to zone. Seesource
tag in firewalld.zone(5). For runtime operation see org.fedoraproject.FirewallD1.zone.Methods.removeSource.Possible errors: NOT_ENABLED
removeSourcePort
(s: port, s: protocol) → NothingPermanently remove (
port
,protocol
) from list of source ports of zone. Seesource-port
tag in firewalld.zone(5). For runtime operation see org.fedoraproject.FirewallD1.zone.Methods.removeSourcePort.Possible errors: NOT_ENABLED
rename
(s: name) → NothingRename not built-in zone to
name
.Possible errors: BUILTIN_ZONE
setDescription
(s: description) → NothingPermanently set description of zone to
description
. Seedescription
tag in firewalld.zone(5).setForwardPorts
(a(ssss): ports) → NothingPermanently set forward ports of zone to list of (
port
,protocol
,toport
,toaddr
). Seeforward-port
tag in firewalld.zone(5).setIcmpBlockInversion
(b: flag) → NothingPermanently set icmp block inversion flag of zone to
flag
. Seeicmp-block-inversion
tag in firewalld.zone(5).setIcmpBlocks
(as: icmptypes) → NothingPermanently set list of icmp types blocked in zone to
icmptypes
. Seeicmp-block
tag in firewalld.zone(5).setInterfaces
(as: interfaces) → NothingPermanently set list of interfaces bound to zone to
interfaces
. Seeinterface
tag in firewalld.zone(5).setMasquerade
(b: masquerade) → NothingPermanently set masquerading in zone to
masquerade
. Seemasquerade
tag in firewalld.zone(5).setPorts
(a(ss): ports) → NothingPermanently set ports of zone to list of (
port
,protocol
). Seeport
tag in firewalld.zone(5).setProtocols
(as: protocols) → NothingPermanently set list of protocols used in zone to
protocols
. Seeprotocol
tag in firewalld.zone(5).setRichRules
(as: rules) → NothingPermanently set list of rich-language rules to
rules
. Seerule
tag in firewalld.zone(5).setServices
(as: services) → NothingPermanently set list of services used in zone to
services
. Seeservice
tag in firewalld.zone(5).setShort
(s: short) → NothingPermanently set name of zone to
short
. Seeshort
tag in firewalld.zone(5).setSourcePorts
(a(ss): ports) → NothingPermanently set source-ports of zone to list of (
port
,protocol
). Seesource-port
tag in firewalld.zone(5).setSources
(as: sources) → NothingPermanently set list of source addresses bound to zone to
sources
. Seesource
tag in firewalld.zone(5).setTarget
(s: target) → NothingPermanently set target of zone to
target
. Seetarget
attribute ofzone
tag in firewalld.zone(5).setVersion
(s: version) → NothingPermanently set version of zone to
version
. Seeversion
attribute ofzone
tag in firewalld.zone(5).update
((sssbsasa(ss)asba(ssss)asasasasa(ss)b): settings) → NothingThis function is deprecated, use org.fedoraproject.FirewallD1.config.zone.Methods.update2 instead.
update2
(a{sv}: settings) → NothingUpdate settings of zone to
settings
. Settings are a dictionary indexed by keywords. For the type of each value see below. To zero a value pass an empty string or list.
version (s)
: seeversion
attribute ofzone
tag in firewalld.zone(5).name (s)
: seeshort
tag in firewalld.zone(5).description (s)
: seedescription
tag in firewalld.zone(5).target (s)
: seetarget
attribute ofzone
tag in firewalld.zone(5).services (as)
: array of service names, seeservice
tag in firewalld.zone(5).ports (a(ss))
: array of port and protocol pairs. Seeport
tag in firewalld.zone(5).icmp_blocks (as)
: array of icmp-blocks. Seeicmp-block
tag in firewalld.zone(5).masquerade (b)
: seemasquerade
tag in firewalld.zone(5).forward_ports (a(ssss))
: array of (port, protocol, to-port, to-addr). Seeforward-port
tag in firewalld.zone(5).interfaces (as)
: array of interfaces. Seeinterface
tag in firewalld.zone(5).sources (as)
: array of source addresses. Seesource
tag in firewalld.zone(5).rules_str (as)
: array of rich-language rules. Seerule
tag in firewalld.zone(5).protocols (as)
: array of protocols, seeprotocol
tag in firewalld.zone(5).source_ports (a(ss))
: array of port and protocol pairs. Seesource-port
tag in firewalld.zone(5).icmp_block_inversion (b)
: seeicmp-block-inversion
tag in firewalld.zone(5).forward (b)
: seeforward
tag in firewalld.zone(5).
Possible errors: INVALID_TYPE
Properties
builtin - b - (ro) True if zone is build-in, false else.
default - b - (ro) True if build-in zone has default settings. False if it has been modified. Always False for not build-in zones.
filename - s - (ro) Name (including .xml extension) of file where the configuration is stored.
name - s - (ro) Name of zone.
path - s - (ro) Path to directory where the zone configuration is stored. Should be either /usr/lib/firewalld/zones or /etc/firewalld/zones.
org.fedoraproject.FirewallD1.config.policy
Interface for permanent policy configuration, see also firewalld.policy(5).Methods
getSettings
() → a{sv}Return permanent settings of given
policy
. For getting runtime settings see org.fedoraproject.FirewallD1.policy.Methods.getPolicySettings. Settings are a dictionary indexed by keywords. For possible keywords see org.fedoraproject.FirewallD1.config.Methods.addPolicy.loadDefaults
() → NothingLoad default settings for built-in policy.
Possible errors: NO_DEFAULTS
remove
() → NothingRemove not built-in policy.
Possible errors: BUILTIN_POLICY
rename
(s: name) → NothingRename not built-in policy to
name
.Possible errors: BUILTIN_POLICY
update
(a{sv}: settings) → NothingUpdate settings of policy to
settings
. Settings are a dictionary indexed by keywords. For possible keywords see org.fedoraproject.FirewallD1.config.Methods.addPolicy. To zero a value pass an empty string or list.Possible errors: INVALID_TYPE
Properties
builtin - b - (ro) True if policy is build-in, false else.
default - b - (ro) True if build-in policy has default settings. False if it has been modified. Always False for not build-in policies.
filename - s - (ro) Name (including .xml extension) of file where the configuration is stored.
name - s - (ro) Name of policy.
path - s - (ro) Path to directory where the policy configuration is stored. Should be either /usr/lib/firewalld/policies or /etc/firewalld/policies.
org.fedoraproject.FirewallD1.config.service
Interface for permanent service configuration, see also firewalld.service(5).Methods
addModule
(s: module) → NothingThis method is deprecated. Please use "helpers" in the update2() method.
addPort
(s: port, s: protocol) → NothingPermanently add (
port
,protocol
) to list of ports in service. Seeport
tag in firewalld.service(5).Possible errors: ALREADY_ENABLED
addProtocol
(s: protocol) → NothingPermanently add protocol into
zone
. The protocol can be any protocol supported by the system. Please have a look at/etc/protocols
for supported protocols. Seeprotocol
tag in firewalld.service(5).Possible errors: INVALID_PROTOCOL, ALREADY_ENABLED
addSourcePort
(s: port, s: protocol) → NothingPermanently add (
port
,protocol
) to list of source ports in service. Seesource-port
tag in firewalld.service(5).Possible errors: ALREADY_ENABLED
getDescription
() → sGet description of service. See
description
tag in firewalld.service(5).getDestination
(s: family) → sGet destination for IP family being either 'ipv4' or 'ipv6'. See
destination
tag in firewalld.service(5).Possible errors: ALREADY_ENABLED
getDestinations
() → a{ss}Get list of destinations. Return value is a dictionary of {IP family : IP address} where 'IP family' key can be either 'ipv4' or 'ipv6'. See
destination
tag in firewalld.service(5).getModules
() → asThis method is deprecated. Please use "helpers" in the getSettings2() method.
getPorts
() → a(ss)Get list of (
port
,protocol
) defined in service. Seeport
tag in firewalld.service(5).getProtocols
() → asReturn array of protocols (s) defined in
service
. Seeprotocol
tag in firewalld.service(5).getSettings
() → (sssa(ss)asa{ss}asa(ss))This function is deprecated, use org.fedoraproject.FirewallD1.config.service.Methods.getSettings2 instead.
getSettings2
(s:service
) → s{sv}Return runtime settings of given
service
. For getting runtime settings see org.fedoraproject.FirewallD1.Methods.getServiceSettings2. Settings are a dictionary indexed by keywords. For the type of each value see below. If the value is empty it may be omitted.
version (s)
: seeversion
attribute ofservice
tag in firewalld.service(5).name (s)
: seeshort
tag in firewalld.service(5).description (s)
: seedescription
tag in firewalld.service(5).ports (a(ss))
: array of port and protocol pairs. Seeport
tag in firewalld.service(5).module names (as)
: array of kernel netfilter helpers, seemodule
tag in firewalld.service(5).destinations (a{ss})
: dictionary of {IP family : IP address} where 'IP family' key can be either 'ipv4' or 'ipv6'. Seedestination
tag in firewalld.service(5).protocols (as)
: array of protocols, seeprotocol
tag in firewalld.service(5).source_ports (a(ss))
: array of port and protocol pairs. Seesource-port
tag in firewalld.service(5).includes (as)
: array of service includes, seeinclude
tag in firewalld.service(5).helpers (as)
: array of service helpers, seehelper
tag in firewalld.service(5).
getShort
() → sGet name of service. See
short
tag in firewalld.service(5).getSourcePorts
() → a(ss)Get list of (
port
,protocol
) defined in service. Seesource-port
tag in firewalld.service(5).getVersion
() → sGet version of service. See
version
attribute ofservice
tag in firewalld.service(5).loadDefaults
() → NothingLoad default settings for built-in service.
Possible errors: NO_DEFAULTS
queryDestination
(s: family, s: address) → bReturn whether a
destination
is in dictionary of destinations of this service. destination is in format: (IP family
,IP address
) whereIP family
can be either 'ipv4' or 'ipv6'. Seedestination
tag in firewalld.service(5).queryModule
(s: module) → bThis method is deprecated. Please use "helpers" in the getSettings2() method.
queryPort
(s: port, s: protocol) → bReturn whether (
port
,protocol
) is in list of ports in service. Seeport
tag in firewalld.service(5).queryProtocol
(s: protocol) → bReturn whether
protocol
is in list of protocols in service. Seeprotocol
tag in firewalld.service(5).querySourcePort
(s: port, s: protocol) → bReturn whether (
port
,protocol
) is in list of source ports in service. Seesource-port
tag in firewalld.service(5).remove
() → NothingRemove not built-in service.
Possible errors: BUILTIN_SERVICE
removeDestination
(s: family) → NothingPermanently remove a destination with
family
('ipv4' or 'ipv6') from service. Seedestination
tag in firewalld.service(5).Possible errors: NOT_ENABLED
removeModule
(s: module) → NothingThis method is deprecated. Please use "helpers" in the update2() method.
removePort
(s: port, s: protocol) → NothingPermanently remove (
port
,protocol
) from list of ports in service. Seeport
tag in firewalld.service(5).Possible errors: NOT_ENABLED
removeProtocol
(s: protocol) → NothingPermanently remove
protocol
from list of protocols in service. Seeprotocol
tag in firewalld.service(5).Possible errors: NOT_ENABLED
removeSourcePort
(s: port, s: protocol) → NothingPermanently remove (
port
,protocol
) from list of source ports in service. Seesource-port
tag in firewalld.service(5).Possible errors: NOT_ENABLED
rename
(s: name) → NothingRename not built-in service to
name
.Possible errors: BUILTIN_SERVICE
setDescription
(s: description) → NothingPermanently set description of service to
description
. Seedescription
tag in firewalld.service(5).setDestination
(s: family, s: address) → NothingPermanently set a destination address. destination is in format: (
IP family
,IP address
) whereIP family
can be either 'ipv4' or 'ipv6'. Seedestination
tag in firewalld.service(5).Possible errors: ALREADY_ENABLED
setDestinations
(a{ss}: destinations) → NothingPermanently set destinations of service to
destinations
, which is a dictionary of {IP family : IP address} where 'IP family' key can be either 'ipv4' or 'ipv6'. Seedestination
tag in firewalld.service(5).setModules
(as: modules) → NothingThis method is deprecated. Please use "helpers" in the update2() method.
setPorts
(a(ss): ports) → NothingPermanently set ports of service to list of (
port
,protocol
). Seeport
tag in firewalld.service(5).setProtocols
(as: protocols) → NothingPermanently set protocols of service to list of
protocols
. Seeprotocol
tag in firewalld.service(5).setShort
(s: short) → NothingPermanently set name of service to
short
. Seeshort
tag in firewalld.service(5).setSourcePorts
(a(ss): ports) → NothingPermanently set source-ports of service to list of (
port
,protocol
). Seesource-port
tag in firewalld.service(5).setVersion
(s: version) → NothingPermanently set version of service to
version
. Seeversion
attribute ofservice
tag in firewalld.service(5).update
((sssa(ss)asa{ss}asa(ss)): settings) → NothingThis function is deprecated, use org.fedoraproject.FirewallD1.config.service.Methods.update2 instead.
update2
a{sv}: settings) → NothingUpdate settings of service to
settings
. Settings are a dictionary indexed by keywords. For the type of each value see below. To zero a value pass an empty string or list.
version (s)
: seeversion
attribute ofservice
tag in firewalld.service(5).name (s)
: seeshort
tag in firewalld.service(5).description (s)
: seedescription
tag in firewalld.service(5).ports (a(ss))
: array of port and protocol pairs. Seeport
tag in firewalld.service(5).module names (as)
: array of kernel netfilter helpers, seemodule
tag in firewalld.service(5).destinations (a{ss})
: dictionary of {IP family : IP address} where 'IP family' key can be either 'ipv4' or 'ipv6'. Seedestination
tag in firewalld.service(5).protocols (as)
: array of protocols, seeprotocol
tag in firewalld.service(5).source_ports (a(ss))
: array of port and protocol pairs. Seesource-port
tag in firewalld.service(5).includes (as)
: array of service includes, seeinclude
tag in firewalld.service(5).helpers (as)
: array of service helpers, seehelper
tag in firewalld.service(5).
Possible errors: INVALID_TYPE
Properties
builtin - b - (ro) True if service is build-in, false else.
default - b - (ro) True if build-in service has default settings. False if it has been modified. Always False for not build-in services.
filename - s - (ro) Name (including .xml extension) of file where the configuration is stored.
name - s - (ro) Name of service.
path - s - (ro) Path to directory where the configuration is stored. Should be either /usr/lib/firewalld/services or /etc/firewalld/services.
org.fedoraproject.FirewallD1.config.helper
Interface for permanent helper configuration, see also firewalld.helper(5).Methods
addPort
(s: port, s: protocol) → NothingPermanently add (
port
,protocol
) to list of ports in helper. Seeport
tag in firewalld.helper(5).Possible errors: ALREADY_ENABLED
getDescription
() → sGet description of helper. See
description
tag in firewalld.helper(5).getFamily
() → sGet family being 'ipv4', 'ipv6' or empty for both. See
family
tag in firewalld.helper(5).getModule
() → sGet modules (netfilter kernel helpers) used in helper. See
module
tag in firewalld.helper(5).getPorts
() → a(ss)Get list of (
port
,protocol
) defined in helper. Seeport
tag in firewalld.helper(5).getSettings
() → (sssssa(ss))Return permanent settings of a
helper
. For getting runtime settings see org.fedoraproject.FirewallD1.Methods.getHelperSettings. Settings are in format:version
,name
,description
,family
,module
, array ofports
(port, protocol).
version (s)
: seeversion
attribute ofhelper
tag in firewalld.helper(5).name (s)
: seeshort
tag in firewalld.helper(5).description (s)
: seedescription
tag in firewalld.helper(5).family (s)
: seefamily
tag in firewalld.helper(5).module (s)
: seemodule
tag in firewalld.helper(5).ports (a(ss))
: array of port and protocol pairs. Seeport
tag in firewalld.helper(5).
getShort
() → sGet name of helper. See
short
tag in firewalld.helper(5).getVersion
() → sGet version of helper. See
version
attribute ofhelper
tag in firewalld.helper(5).loadDefaults
() → NothingLoad default settings for built-in helper.
Possible errors: NO_DEFAULTS
queryFamily
(s: module) → bReturn whether
family
is set for helper. Seefamily
tag in firewalld.helper(5).queryModule
(s: module) → bReturn whether
module
(netfilter kernel helpers) is used in helper. Seemodule
tag in firewalld.helper(5).queryPort
(s: port, s: protocol) → bReturn whether (
port
,protocol
) is in list of ports in helper. Seeport
tag in firewalld.helper(5).remove
() → NothingRemove not built-in helper.
Possible errors: BUILTIN_HELPER
removePort
(s: port, s: protocol) → NothingPermanently remove (
port
,protocol
) from list of ports in helper. Seeport
tag in firewalld.helper(5).Possible errors: NOT_ENABLED
rename
(s: name) → NothingRename not built-in helper to
name
.Possible errors: BUILTIN_HELPER
setDescription
(s: description) → NothingPermanently set description of helper to
description
. Seedescription
tag in firewalld.helper(5).setFamily
(s: family) → NothingPermanently set family of helper to
family
. Seefamily
tag in firewalld.helper(5).setModule
(s: module) → NothingPermanently set module of helper to
description
. Seemodule
tag in firewalld.helper(5).setPorts
(a(ss): ports) → NothingPermanently set ports of helper to list of (
port
,protocol
). Seeport
tag in firewalld.helper(5).setShort
(s: short) → NothingPermanently set name of helper to
short
. Seeshort
tag in firewalld.helper(5).setVersion
(s: version) → NothingPermanently set version of helper to
version
. Seeversion
attribute ofhelper
tag in firewalld.helper(5).update
((sssssa(ss)): settings) → NothingUpdate settings of helper to
settings
. Settings are in format:version
,name
,description
,family
,module
and array ofports
.
version (s)
: seeversion
attribute ofhelper
tag in firewalld.helper(5).name (s)
: seeshort
tag in firewalld.helper(5).description (s)
: seedescription
tag in firewalld.helper(5).family (s)
: seefamily
tag in firewalld.helper(5).module (s)
: seemodule
tag in firewalld.helper(5).ports (a(ss))
: array of port and protocol pairs. Seeport
tag in firewalld.helper(5).
Possible errors: INVALID_HELPER
Properties
builtin - b - (ro) True if helper is build-in, false else.
default - b - (ro) True if build-in helper has default settings. False if it has been modified. Always False for not build-in helpers.
filename - s - (ro) Name (including .xml extension) of file where the configuration is stored.
name - s - (ro) Name of helper.
path - s - (ro) Path to directory where the configuration is stored. Should be either /usr/lib/firewalld/helpers or /etc/firewalld/helpers.
org.fedoraproject.FirewallD1.config.icmptype
Interface for permanent icmp type configuration, see also firewalld.icmptype(5).Methods
addDestination
(s: destination) → NothingPermanently add a
destination
('ipv4' or 'ipv6') to list of destinations of this icmp type. Seedestination
tag in firewalld.icmptype(5).Possible errors: ALREADY_ENABLED
getDescription
() → sGet description of icmp type. See
description
tag in firewalld.icmptype(5).getDestinations
() → asGet list of destinations. See
destination
tag in firewalld.icmptype(5).getSettings
() → (sssas)Return permanent settings of
icmp type
. For getting runtime settings see org.fedoraproject.FirewallD1.Methods.getIcmpTypeSettings. Settings are in format:version
,name
,description
, array ofdestinations
.
version (s)
: seeversion
attribute oficmptype
tag in firewalld.icmptype(5).name (s)
: seeshort
tag in firewalld.icmptype(5).description (s)
: seedescription
tag in firewalld.icmptype(5).destinations (as)
: array, either empty or containing strings 'ipv4' and/or 'ipv6', see destination tag in firewalld.icmptype(5).
getShort
() → sGet name of icmp type. See
short
tag in firewalld.icmptype(5).getVersion
() → sGet version of icmp type. See
version
attribute oficmptype
tag in firewalld.icmptype(5).loadDefaults
() → NothingLoad default settings for built-in icmp type.
Possible errors: NO_DEFAULTS
queryDestination
(s: destination) → bReturn whether a
destination
('ipv4' or 'ipv6') is in list of destinations of this icmp type. Seedestination
tag in firewalld.icmptype(5).remove
() → NothingRemove not built-in icmp type.
Possible errors: BUILTIN_ICMPTYPE
removeDestination
(s: destination) → NothingPermanently remove a
destination
('ipv4' or 'ipv6') from list of destinations of this icmp type. Seedestination
tag in firewalld.icmptype(5).Possible errors: NOT_ENABLED
rename
(s: name) → NothingRename not built-in icmp type to
name
.Possible errors: BUILTIN_ICMPTYPE
setDescription
(s: description) → NothingPermanently set description of icmp type to
description
. Seedescription
tag in firewalld.icmptype(5).setDestinations
(as: destinations) → NothingPermanently set destinations of icmp type to
destinations
, which is array, either empty or containing strings 'ipv4' and/or 'ipv6'. Seedestination
tag in firewalld.icmptype(5).setShort
(s: short) → NothingPermanently set name of icmp type to
short
. Seeshort
tag in firewalld.icmptype(5).setVersion
(s: version) → NothingPermanently set version of icmp type to
version
. Seeversion
attribute oficmptype
tag in firewalld.icmptype(5).update
((sssas): settings) → NothingUpdate permanent settings of icmp type to
settings
. Settings are in format:version
,name
,description
, array ofdestinations
.
version (s)
: seeversion
attribute oficmptype
tag in firewalld.icmptype(5).name (s)
: seeshort
tag in firewalld.icmptype(5).description (s)
: seedescription
tag in firewalld.icmptype(5).destinations (as)
: array, either empty or containing strings 'ipv4' and/or 'ipv6', see destination tag in firewalld.icmptype(5).
Properties
builtin - b - (ro) True if icmptype is build-in, false else.
default - b - (ro) True if 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 .xml extension) of file where the configuration is stored.
name - s - (ro) Name of icmp type.
path - s - (ro) Path to directory where the icmp type configuration is stored. Should be either /usr/lib/firewalld/icmptypes or /etc/firewalld/icmptypes.
See Also
firewall-applet(1), firewalld(1), firewall-cmd(1), firewall-config(1), firewalld.conf(5), firewalld.direct(5), firewalld.dbus(5), firewalld.icmptype(5), firewalld.lockdown-whitelist(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)