commit d34ba69740071bfbe920914b55b1c822fc5516e6 Author: Jiri Popelka Date: Tue Feb 25 18:40:56 2014 +0100 firewall-offline-cmd(1): document new options diff --git a/doc/xml/firewall-offline-cmd.xml b/doc/xml/firewall-offline-cmd.xml index dbd09da..7b6f3ea 100644 --- a/doc/xml/firewall-offline-cmd.xml +++ b/doc/xml/firewall-offline-cmd.xml @@ -114,7 +114,7 @@ - General Options + Lokkit Compatibility Options =module @@ -251,6 +251,984 @@ + + + Zone Options + + + + + + Print default zone for connections and interfaces. + + + + + + =zone + + + Set default zone for connections and interfaces where no zone has been selected. Setting the default zone changes the zone for the connections or interfaces, that are using the default zone. + + + + + + + + + Print predefined zones as a space separated list. + + + + + + + + + Print predefined services as a space separated list. + + + + + + + + + Print predefined icmptypes as a space separated list. + + + + + + =interface + + + Print the name of the zone the interface is bound to or no zone. + + + + + + =source/mask + + + Print the name of the zone the source/mask is bound to or no zone. + + + + + + + + + List everything added for or enabled in all zones. The output format is: + +zone1 + interfaces: interface1 .. + sources: source1 .. + services: service1 .. + ports: port1 .. + forward-ports: + forward-port1 + .. + icmp-blocks: icmp-type1 .. + rich rules: + rich-rule1 + .. +.. + + + + + + + =zone + + + Add a new permanent zone. + + + + + + =zone + + + Delete an existing permanent zone. + + + + + + =zone + + + Get the target of a permanent zone. + + + + + + =zone =zone + + + Set the target of a permanent zone. + + + + + + + + Options to Adapt and Query Zones + + Options in this section affect only one particular zone. If used with =zone option, they affect the zone zone. If the option is omitted, they affect default zone (see ). + + + + + + + =zone + + + List everything added for or enabled in zone. If zone is omitted, default zone will be used. + + + + + + + + =zone + + + List services added for zone as a space separated list. If zone is omitted, default zone will be used. + + + + + + =zone =service + + + Add a service for zone. If zone is omitted, default zone will be used. This option can be specified multiple times. + + + The service is one of the firewalld provided services. To get a list of the supported services, use firewall-cmd --get-services. + + + + + + =zone =service + + + Remove a service from zone. This option can be specified multiple times. If zone is omitted, default zone will be used. + + + + + + =zone =service + + + Return whether service has been added for zone. If zone is omitted, default zone will be used. Returns 0 if true, 1 otherwise. + + + + + + + + =zone + + + List ports added for zone as a space separated list. A port is of the form portid-portid/protocol, it can be either a port and protocol pair or a port range with a protocol. If zone is omitted, default zone will be used. + + + + + + =zone =portid-portid/protocol + + + Add the port for zone. If zone is omitted, default zone will be used. This option can be specified multiple times. + + + The port can either be a single port number or a port range portid-portid. The protocol can either be tcp or udp. + + + + + + =zone =portid-portid/protocol + + + Remove the port from zone. If zone is omitted, default zone will be used. This option can be specified multiple times. + + + + + + =zone =portid-portid/protocol + + + Return whether the port has been added for zone. If zone is omitted, default zone will be used. Returns 0 if true, 1 otherwise. + + + + + + + + =zone + + + List Internet Control Message Protocol (ICMP) type blocks added for zone as a space separated list. If zone is omitted, default zone will be used. + + + + + + =zone =icmptype + + + Add an ICMP block for icmptype for zone. If zone is omitted, default zone will be used. This option can be specified multiple times. + + + The icmptype is the one of the icmp types firewalld supports. To get a listing of supported icmp types: firewall-cmd --get-icmptypes + + + + + + =zone =icmptype + + + Remove the ICMP block for icmptype from zone. If zone is omitted, default zone will be used. This option can be specified multiple times. + + + + + + =zone =icmptype + + + Return whether an ICMP block for icmptype has been added for zone. If zone is omitted, default zone will be used. Returns 0 if true, 1 otherwise. + + + + + + + + =zone + + + List IPv4 forward ports added for zone as a space separated list. If zone is omitted, default zone will be used. + + + For IPv6 forward ports, please use the rich language. + + + + + + =zone =port=portid-portid:proto=protocol:toport=portid-portid:toaddr=address/mask + + + Add the IPv4 forward port for zone. If zone is omitted, default zone will be used. This option can be specified multiple times. + + + The port can either be a single port number portid or a port range portid-portid. The protocol can either be tcp or udp. The destination address is a simple IP address. + + + For IPv6 forward ports, please use the rich language. + + + + + + =zone =port=portid-portid:proto=protocol:toport=portid-portid:toaddr=address/mask + + + Remove the IPv4 forward port from zone. If zone is omitted, default zone will be used. This option can be specified multiple times. + + + For IPv6 forward ports, please use the rich language. + + + + + + =zone =port=portid-portid:proto=protocol:toport=portid-portid:toaddr=address/mask + + + Return whether the IPv4 forward port has been added for zone. If zone is omitted, default zone will be used. Returns 0 if true, 1 otherwise. + + + For IPv6 forward ports, please use the rich language. + + + + + + + + =zone + + + Enable IPv4 masquerade for zone. If zone is omitted, default zone will be used. Masquerading is useful if the machine is a router and machines connected over an interface in another zone should be able to use the first connection. + + + For IPv6 masquerading, please use the rich language. + + + + + + =zone + + + Disable IPv4 masquerade for zone. If zone is omitted, default zone will be used. + + + For IPv6 masquerading, please use the rich language. + + + + + + =zone + + + Return whether IPv4 masquerading has been enabled for zone. If zone is omitted, default zone will be used. Returns 0 if true, 1 otherwise. + + + For IPv6 masquerading, please use the rich language. + + + + + + + + =zone + + + List rich language rules added for zone as a newline separated list. If zone is omitted, default zone will be used. + + + + + + =zone ='rule' + + + Add rich language rule 'rule' for zone. This option can be specified multiple times. If zone is omitted, default zone will be used. + + + For the rich language rule syntax, please have a look at firewalld.richlanguage5. + + + + + + =zone ='rule' + + + Remove rich language rule 'rule' from zone. This option can be specified multiple times. If zone is omitted, default zone will be used. + + + For the rich language rule syntax, please have a look at firewalld.richlanguage5. + + + + + + =zone ='rule' + + + Return whether a rich language rule 'rule' has been added for zone. If zone is omitted, default zone will be used. Returns 0 if true, 1 otherwise. + + + For the rich language rule syntax, please have a look at firewalld.richlanguage5. + + + + + + + + Options to Handle Bindings of Interfaces + + Binding an interface to a zone means that this zone settings are used to restrict traffic via the interface. + + + Options in this section affect only one particular zone. If used with =zone option, they affect the zone zone. If the option is omitted, they affect default zone (see ). + + + For a list of predefined zones use firewall-cmd --get-zones. + + + An interface name is a string up to 16 characters long, that may not contain , , and . + + + + =zone + + + List interfaces that are bound to zone zone as a space separated list. If zone is omitted, default zone will be used. + + + + + + =zone =interface + + + Bind interface interface to zone zone. If zone is omitted, default zone will be used. + + + + + + =zone =interface + + + Change zone the interface interface is bound to to zone zone. If zone is omitted, default zone will be used. If old and new zone are the same, the call will be ignored without an error. If the interface has not been bound to a zone before, it will behave like . + + + + + + =zone =interface + + + Query whether interface interface is bound to zone zone. Returns 0 if true, 1 otherwise. + + + + + + =zone =interface + + + Remove binding of interface interface from zone zone. If zone is omitted, default zone will be used. + + + + + + + + Options to Handle Bindings of Sources + + Binding a source to a zone means that this zone settings will be used to restrict traffic from this source. + + + 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. The use of host names is not supported. + + + Options in this section affect only one particular zone. If used with =zone option, they affect the zone zone. If the option is omitted, they affect default zone (see ). + + + For a list of predefined zones use firewall-cmd --get-zones. + + + + =zone + + + List sources that are bound to zone zone as a space separated list. If zone is omitted, default zone will be used. + + + + + + =zone =source/mask + + + Bind source source/mask to zone zone. If zone is omitted, default zone will be used. + + + + + + =zone =source/mask + + + Change zone the source source/mask is bound to to zone zone. If zone is omitted, default zone will be used. If old and new zone are the same, the call will be ignored without an error. If the source has not been bound to a zone before, it will behave like . + + + + + + =zone =source/mask + + + Query whether the source source/mask is bound to the zone zone. Returns 0 if true, 1 otherwise. + + + + + + =zone =source/mask + + + Remove binding of source source/mask from zone zone. If zone is omitted, default zone will be used. + + + + + + + + Service Options + + + =service + + + Add a new permanent service. + + + + + + =service + + + Delete an existing permanent service. + + + + + + + + Internet Control Message Protocol (ICMP) type Options + + + =icmptype + + + Add a new permanent icmptype. + + + + + + =icmptype + + + Delete an existing permanent icmptype. + + + + + + + + Direct Options + + The direct options give a more direct access to the firewall. These options require user to know basic iptables concepts, i.e. table (filter/mangle/nat/...), chain (INPUT/OUTPUT/FORWARD/...), commands (-A/-D/-I/...), parameters (-p/-s/-d/-j/...) and targets (ACCEPT/DROP/REJECT/...). + + + Direct options should be used only as a last resort when it's not possible to use for example =service or ='rule'. + + + The first argument of each option has to be ipv4 or ipv6 or eb. With ipv4 it will be for IPv4 (iptables8), with ipv6 for IPv6 (ip6tables8) and with eb for ethernet bridges (ebtables8). + + + + + + + + + + Get all chains added to all tables. + + + This option concerns only chains previously added with . + + + + + + { ipv4 | ipv6 | eb } table + + + Get all chains added to table table as a space separated list. + + + This option concerns only chains previously added with . + + + + + + { ipv4 | ipv6 | eb } table chain + + + Add a new chain with name chain to table table. + + + There already exist basic chains to use with direct options, for example INPUT_direct chain (see iptables-save | grep direct output for all of them). + These chains are jumped into before chains for zones, i.e. every rule put into INPUT_direct will be checked before rules in zones. + + + + + + { ipv4 | ipv6 | eb } table chain + + + Remove the chain with name chain from table table. + + + + + + { ipv4 | ipv6 | eb } table chain + + + Return whether a chain with name chain exists in table table. Returns 0 if true, 1 otherwise. + + + This option concerns only chains previously added with . + + + + + + + + + + + Get all rules added to all chains in all tables as a newline separated list of the priority and arguments. + + + + + + { ipv4 | ipv6 | eb } table chain + + + Get all rules added to chain chain in table table as a newline separated list of the priority and arguments. + + + + + + { ipv4 | ipv6 | eb } table chain priority args + + + Add a rule with the arguments args to chain chain in table table with priority priority. + + + 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. + + + + + + { ipv4 | ipv6 | eb } table chain priority args + + + Remove a rule with priority and the arguments args from chain chain in table table. + + + + + + { ipv4 | ipv6 | eb } table chain + + + Remove all rules in the chain with name chain exists in table table. + + + This option concerns only rules previously added with in this chain. + + + + + + { ipv4 | ipv6 | eb } table chain priority args + + + Return whether a rule with priority and the arguments args exists in chain chain in table table. Returns 0 if true, 1 otherwise. + + + + + + + + + + + Get all permanent passthrough as a newline separated list of the ipv value and arguments. + + + + + + { ipv4 | ipv6 | eb } + + + Get all permanent passthrough rules for the ipv value as a newline separated list of the priority and arguments. + + + + + + { ipv4 | ipv6 | eb } args + + + Add a permanent passthrough rule with the arguments args for the ipv value. + + + + + + { ipv4 | ipv6 | eb } args + + + Remove a permanent passthrough rule with the arguments args for the ipv value. + + + + + + { ipv4 | ipv6 | eb } args + + + Return whether a permanent passthrough rule with the arguments args exists for the ipv value. Returns 0 if true, 1 otherwise. + + + + + + + + Lockdown Options + + Local applications or services are able to change the firewall configuration if they are running as root (example: libvirt) or are authenticated using PolicyKit. With this feature administrators can lock the firewall configuration so that only applications on lockdown whitelist are able to request firewall changes. + + + The lockdown access check limits D-Bus methods that are changing firewall rules. Query, list and get methods are not limited. + + + The lockdown feature is a very light version of user and application policies for firewalld and is turned off by default. + + + + + + + Enable lockdown. Be careful - if firewall-cmd is not on lockdown whitelist when you enable lockdown you won't be able to disable it again with firewall-cmd, you would need to edit firewalld.conf. + + + + + + + + + Disable lockdown. + + + + + + + + + Query whether lockdown is enabled. Returns 0 if lockdown is enabled, 1 otherwise. + + + + + + + + Lockdown Whitelist Options + + The lockdown whitelist can contain commands, contexts, users and user ids. + + + If a command entry on the whitelist ends with an asterisk '*', then all command lines starting with the command will match. If the '*' is not there the absolute command inclusive arguments must match. + + + Commands for user root and others is not always the same. Example: As root /bin/firewall-cmd is used, as a normal user /usr/bin/firewall-cmd is be used on Fedora. + + + The context is the security (SELinux) context of a running application or service. To get the context of a running application use ps -e --context. + + + Warning: If the context is unconfined, then this will open access for more than the desired application. + + + The lockdown whitelist entries are checked in the following order: + + 1. context + 2. uid + 3. user + 4. command + + + + + + + + List all command lines that are on the whitelist. + + + + + + =command + + + Add the command to the whitelist. + + + + + + =command + + + Remove the command from the whitelist. + + + + + + =command + + + Query whether the command is on the whitelist. Returns 0 if true, 1 otherwise. + + + + + + + + + List all contexts that are on the whitelist. + + + + + + =context + + + Add the context context to the whitelist. + + + + + + =context + + + Remove the context from the whitelist. + + + + + + =context + + + Query whether the context is on the whitelist. Returns 0 if true, 1 otherwise. + + + + + + + + + List all user ids that are on the whitelist. + + + + + + =uid + + + Add the user id uid to the whitelist. + + + + + + =uid + + + Remove the user id uid from the whitelist. + + + + + + =uid + + + Query whether the user id uid is on the whitelist. Returns 0 if true, 1 otherwise. + + + + + + + + + List all user names that are on the whitelist. + + + + + + =user + + + Add the user name user to the whitelist. + + + + + + =user + + + Remove the user name user from the whitelist. + + + + + + =user + + + Query whether the user name user is on the whitelist. Returns 0 if true, 1 otherwise. + + + + + + &seealso;