1FIREWALL-CMD(1)                  firewall-cmd                  FIREWALL-CMD(1)
2
3
4

NAME

6       firewall-cmd - firewalld command line client
7

SYNOPSIS

9       firewall-cmd [OPTIONS...]
10

DESCRIPTION

12       firewall-cmd is the command line client of the firewalld daemon. It
13       provides an interface to manage the runtime and permanent
14       configurations.
15
16       The runtime configuration in firewalld is separated from the permanent
17       configuration. This means that things can get changed in the runtime or
18       permanent configuration.
19

OPTIONS

21       Sequence options are the options that can be specified multiple times,
22       the exit code is 0 if there is at least one item that succeeded. The
23       ALREADY_ENABLED (11), NOT_ENABLED (12) and also ZONE_ALREADY_SET (16)
24       errors are treated as succeeded. If there are issues while parsing the
25       items, then these are treated as warnings and will not change the
26       result as long as there is a succeeded one. Without any succeeded item,
27       the exit code will depend on the error codes. If there is exactly one
28       error code, then this is used. If there are more than one then
29       UNKNOWN_ERROR (254) will be used.
30
31       The following options are supported:
32
33   General Options
34       -h, --help
35           Prints a short help text and exits.
36
37       -V, --version
38           Print the version string of firewalld. This option is not
39           combinable with other options.
40
41       -q, --quiet
42           Do not print status messages.
43
44   Status Options
45       --state
46           Check whether the firewalld daemon is active (i.e. running).
47           Returns an exit code 0 if it is active, RUNNING_BUT_FAILED if
48           failure occurred on startup, NOT_RUNNING otherwise. See the section
49           called “EXIT CODES”. This will also print the state to STDOUT.
50
51       --reload
52           Reload firewall rules and keep state information. Current permanent
53           configuration will become new runtime configuration, i.e. all
54           runtime only changes done until reload are lost with reload if they
55           have not been also in permanent configuration.
56
57           Note: If FlushAllOnReload=no, runtime changes applied via the
58           direct interface are not affected and will therefore stay in place
59           until firewalld daemon is restarted completely. For
60           FlushAllOnReload, see firewalld.conf(5).
61
62       --complete-reload
63           Reload firewall completely, even netfilter kernel modules. This
64           will most likely terminate active connections, because state
65           information is lost. This option should only be used in case of
66           severe firewall problems. For example if there are state
67           information problems that no connection can be established with
68           correct firewall rules.
69
70           Note: If FlushAllOnReload=no, runtime changes applied via the
71           direct interface are not affected and will therefore stay in place
72           until firewalld daemon is restarted completely. For
73           FlushAllOnReload, see firewalld.conf(5).
74
75       --runtime-to-permanent
76           Save active runtime configuration and overwrite permanent
77           configuration with it. The way this is supposed to work is that
78           when configuring firewalld you do runtime changes only and once
79           you're happy with the configuration and you tested that it works
80           the way you want, you save the configuration to disk.
81
82       --check-config
83           Run checks on the permanent configuration. This includes XML
84           validity and semantics.
85
86       --reset-to-defaults
87           Reset configuration to firewalld's default configuration.
88
89   Log Denied Options
90       --get-log-denied
91           Print the log denied setting.
92
93       --set-log-denied=value
94           Add logging rules right before reject and drop rules in the INPUT,
95           FORWARD and OUTPUT chains for the default rules and also final
96           reject and drop rules in zones for the configured link-layer packet
97           type. The possible values are: all, unicast, broadcast, multicast
98           and off. The default setting is off, which disables the logging.
99
100           This is a runtime and permanent change and will also reload the
101           firewall to be able to add the logging rules.
102
103   Permanent Options
104       --permanent
105           The permanent option --permanent can be used to set options
106           permanently. These changes are not effective immediately, only
107           after service restart/reload or system reboot. Without the
108           --permanent option, a change will only be part of the runtime
109           configuration.
110
111           If you want to make a change in runtime and permanent
112           configuration, use the same call with and without the --permanent
113           option.
114
115           The --permanent option can be optionally added to all options
116           further down where it is supported.
117
118   Zone Options
119       --get-default-zone
120           Print default zone for connections and interfaces.
121
122       --set-default-zone=zone
123           Set default zone for connections and interfaces where no zone has
124           been selected. Setting the default zone changes the zone for the
125           connections or interfaces, that are using the default zone.
126
127           This is a runtime and permanent change.
128
129       --get-active-zones
130           Print currently active zones altogether with interfaces and sources
131           used in these zones. Active zones are zones, that have a binding to
132           an interface or source. The output format is:
133
134               zone1
135                 interfaces: interface1 interface2 ..
136                 sources: source1 ..
137               zone2
138                 interfaces: interface3 ..
139               zone3
140                 sources: source2 ..
141
142
143           If there are no interfaces or sources bound to the zone, the
144           corresponding line will be omitted.
145
146       [--permanent] --get-zones
147           Print predefined zones as a space separated list.
148
149       [--permanent] --get-services
150           Print predefined services as a space separated list.
151
152       [--permanent] --get-icmptypes
153           Print predefined icmptypes as a space separated list.
154
155       [--permanent] --get-zone-of-interface=interface
156           Print the name of the zone the interface is bound to or no zone.
157
158       [--permanent] --get-zone-of-source=source[/mask]|MAC|ipset:ipset
159           Print the name of the zone the source is bound to or no zone.
160
161       [--permanent] --info-zone=zone
162           Print information about the zone zone. The output format is:
163
164               zone
165                 interfaces: interface1 ..
166                 sources: source1 ..
167                 services: service1 ..
168                 ports: port1 ..
169                 protocols: protocol1 ..
170                 forward-ports:
171                       forward-port1
172                       ..
173                 source-ports: source-port1 ..
174                 icmp-blocks: icmp-type1 ..
175                 rich rules:
176                       rich-rule1
177                       ..
178
179
180
181       [--permanent] --list-all-zones
182           List everything added for or enabled in all zones. The output
183           format is:
184
185               zone1
186                 interfaces: interface1 ..
187                 sources: source1 ..
188                 services: service1 ..
189                 ports: port1 ..
190                 protocols: protocol1 ..
191                 forward-ports:
192                       forward-port1
193                       ..
194                 icmp-blocks: icmp-type1 ..
195                 rich rules:
196                       rich-rule1
197                       ..
198               ..
199
200
201
202       --permanent --new-zone=zone
203           Add a new permanent and empty zone.
204
205           Zone names must be alphanumeric and may additionally include
206           characters: '_' and '-'.
207
208       --permanent --new-zone-from-file=filename [--name=zone]
209           Add a new permanent zone from a prepared zone file with an optional
210           name override.
211
212       --permanent --delete-zone=zone
213           Delete an existing permanent zone.
214
215       --permanent --load-zone-defaults=zone
216           Load zone default settings or report NO_DEFAULTS error.
217
218       --permanent --path-zone=zone
219           Print path of the zone configuration file.
220
221   Policy Options
222       [--permanent] --get-policies
223           Print predefined policies as a space separated list.
224
225       [--permanent] --info-policy=policy
226           Print information about the policy policy.
227
228       [--permanent] --list-all-policies
229           List everything added for or enabled in all policies.
230
231       --permanent --new-policy=policy
232           Add a new permanent policy.
233
234           Policy names must be alphanumeric and may additionally include
235           characters: '_' and '-'.
236
237       --permanent --new-policy-from-file=filename [--name=policy]
238           Add a new permanent policy from a prepared policy file with an
239           optional name override.
240
241       --permanent --path-policy=policy
242           Print path of the policy configuration file.
243
244       --permanent --delete-policy=policy
245           Delete an existing permanent policy.
246
247       --permanent --load-policy-defaults=policy
248           Load the shipped defaults for a policy. Only applies to policies
249           shipped with firewalld. Does not apply to user defined policies.
250
251   Options to Adapt and Query Zones and Policies
252       Options in this section affect only one particular zone or policy. If
253       used with --zone=zone or --policy=policy option, they affect the
254       specified zone or policy. If both options are omitted, they affect the
255       default zone (see --get-default-zone).
256
257       [--permanent] [--zone=zone] [--policy=policy] --list-all
258           List everything added or enabled.
259
260       --permanent [--zone=zone] [--policy=policy] --get-target
261           Get the target.
262
263       --permanent [--zone=zone] [--policy=policy] --set-target=target
264           Set the target.
265
266           For zones target is one of: default, ACCEPT, DROP, REJECT
267
268           For policies target is one of: CONTINUE, ACCEPT, DROP, REJECT
269
270           default is similar to REJECT, but it implicitly allows ICMP
271           packets.
272
273       --permanent [--zone=zone] [--policy=policy]
274       --set-description=description
275           Set description.
276
277       --permanent [--zone=zone] [--policy=policy] --get-description
278           Print description.
279
280       --permanent [--zone=zone] [--policy=policy] --set-short=description
281           Set short description.
282
283       --permanent [--zone=zone] [--policy=policy] --get-short
284           Print short description.
285
286       [--permanent] [--zone=zone] [--permanent] [--policy=policy]
287       --list-services
288           List services added as a space separated list.
289
290       [--permanent] [--zone=zone] [--permanent] [--policy=policy]
291       --add-service=service [--timeout=timeval]
292           Add a service. This option can be specified multiple times. If a
293           timeout is supplied, the rule will be active for the specified
294           amount of time and will be removed automatically afterwards.
295           timeval is either a number (of seconds) or number followed by one
296           of characters s (seconds), m (minutes), h (hours), for example 20m
297           or 1h.
298
299           The service is one of the firewalld provided services. To get a
300           list of the supported services, use firewall-cmd --get-services.
301
302           The --timeout option is not combinable with the --permanent option.
303
304           Note: Some services define connection tracking helpers. Helpers
305           that may operate in client mode (e.g. tftp) must be added to an
306           outbound policy instead of a zone to take effect for clients.
307           Otherwise the helper will not be applied to the outbound traffic.
308           The related traffic, as defined by the connection tracking helper,
309           on the return path (ingress) will be allowed by the stateful
310           firewall rules.
311
312           An example of an outbound policy for connection tracking helpers:
313
314               # firewall-cmd --permanent --new-policy clientConntrack
315               # firewall-cmd --permanent --policy clientConntrack --add-ingress-zone HOST
316               # firewall-cmd --permanent --policy clientConntrack --add-egress-zone ANY
317               # firewall-cmd --permanent --policy clientConntrack --add-service tftp
318
319
320
321       [--permanent] [--zone=zone] [--permanent] [--policy=policy]
322       --remove-service=service
323           Remove a service. This option can be specified multiple times.
324
325       [--permanent] [--zone=zone] [--permanent] [--policy=policy]
326       --query-service=service
327           Return whether service has been added. Returns 0 if true, 1
328           otherwise.
329
330       [--permanent] [--zone=zone] [--permanent] [--policy=policy]
331       --list-ports
332           List ports added as a space separated list. A port is of the form
333           portid[-portid]/protocol, it can be either a port and protocol pair
334           or a port range with a protocol.
335
336       [--permanent] [--zone=zone] [--permanent] [--policy=policy]
337       --add-port=portid[-portid]/protocol [--timeout=timeval]
338           Add the port. This option can be specified multiple times. If a
339           timeout is supplied, the rule will be active for the specified
340           amount of time and will be removed automatically afterwards.
341           timeval is either a number (of seconds) or number followed by one
342           of characters s (seconds), m (minutes), h (hours), for example 20m
343           or 1h.
344
345           The port can either be a single port number or a port range
346           portid-portid. The protocol can either be tcp, udp, sctp or dccp.
347
348           The --timeout option is not combinable with the --permanent option.
349
350       [--permanent] [--zone=zone] [--permanent] [--policy=policy]
351       --remove-port=portid[-portid]/protocol
352           Remove the port. This option can be specified multiple times.
353
354       [--permanent] [--zone=zone] [--permanent] [--policy=policy]
355       --query-port=portid[-portid]/protocol
356           Return whether the port has been added. Returns 0 if true, 1
357           otherwise.
358
359       [--permanent] [--zone=zone] [--permanent] [--policy=policy]
360       --list-protocols
361           List protocols added as a space separated list.
362
363       [--permanent] [--zone=zone] [--permanent] [--policy=policy]
364       --add-protocol=protocol [--timeout=timeval]
365           Add the protocol. This option can be specified multiple times. If a
366           timeout is supplied, the rule will be active for the specified
367           amount of time and will be removed automatically afterwards.
368           timeval is either a number (of seconds) or number followed by one
369           of characters s (seconds), m (minutes), h (hours), for example 20m
370           or 1h.
371
372           The protocol can be any protocol supported by the system. Please
373           have a look at /etc/protocols for supported protocols.
374
375           The --timeout option is not combinable with the --permanent option.
376
377       [--permanent] [--zone=zone] [--permanent] [--policy=policy]
378       --remove-protocol=protocol
379           Remove the protocol. This option can be specified multiple times.
380
381       [--permanent] [--zone=zone] [--permanent] [--policy=policy]
382       --query-protocol=protocol
383           Return whether the protocol has been added. Returns 0 if true, 1
384           otherwise.
385
386       [--permanent] [--zone=zone] [--permanent] [--policy=policy]
387       --list-source-ports
388           List source ports added as a space separated list. A port is of the
389           form portid[-portid]/protocol.
390
391       [--permanent] [--zone=zone] [--permanent] [--policy=policy]
392       --add-source-port=portid[-portid]/protocol [--timeout=timeval]
393           Add the source port. This option can be specified multiple times.
394           If a timeout is supplied, the rule will be active for the specified
395           amount of time and will be removed automatically afterwards.
396           timeval is either a number (of seconds) or number followed by one
397           of characters s (seconds), m (minutes), h (hours), for example 20m
398           or 1h.
399
400           The port can either be a single port number or a port range
401           portid-portid. The protocol can either be tcp, udp, sctp or dccp.
402
403           The --timeout option is not combinable with the --permanent option.
404
405       [--permanent] [--zone=zone] [--permanent] [--policy=policy]
406       --remove-source-port=portid[-portid]/protocol
407           Remove the source port. This option can be specified multiple
408           times.
409
410       [--permanent] [--zone=zone] [--permanent] [--policy=policy]
411       --query-source-port=portid[-portid]/protocol
412           Return whether the source port has been added. Returns 0 if true, 1
413           otherwise.
414
415       [--permanent] [--zone=zone] [--permanent] [--policy=policy]
416       --list-icmp-blocks
417           List Internet Control Message Protocol (ICMP) type blocks added as
418           a space separated list.
419
420       [--permanent] [--zone=zone] [--permanent] [--policy=policy]
421       --add-icmp-block=icmptype [--timeout=timeval]
422           Add an ICMP block for icmptype. This option can be specified
423           multiple times. If a timeout is supplied, the rule will be active
424           for the specified amount of time and will be removed automatically
425           afterwards.  timeval is either a number (of seconds) or number
426           followed by one of characters s (seconds), m (minutes), h (hours),
427           for example 20m or 1h.
428
429           The icmptype is the one of the icmp types firewalld supports. To
430           get a listing of supported icmp types: firewall-cmd --get-icmptypes
431
432           The --timeout option is not combinable with the --permanent option.
433
434       [--permanent] [--zone=zone] [--permanent] [--policy=policy]
435       --remove-icmp-block=icmptype
436           Remove the ICMP block for icmptype. This option can be specified
437           multiple times.
438
439       [--permanent] [--zone=zone] [--permanent] [--policy=policy]
440       --query-icmp-block=icmptype
441           Return whether an ICMP block for icmptype has been added. Returns 0
442           if true, 1 otherwise.
443
444       [--permanent] [--zone=zone] [--permanent] [--policy=policy]
445       --list-forward-ports
446           List IPv4 forward ports added as a space separated list.
447
448           For IPv6 forward ports, please use the rich language.
449
450       [--permanent] [--zone=zone] [--permanent] [--policy=policy]
451       --add-forward-port=port=portid[-portid]:proto=protocol[:toport=portid[-portid]][:toaddr=address[/mask]]
452       [--timeout=timeval]
453           Add the IPv4 forward port. This option can be specified multiple
454           times. If a timeout is supplied, the rule will be active for the
455           specified amount of time and will be removed automatically
456           afterwards.  timeval is either a number (of seconds) or number
457           followed by one of characters s (seconds), m (minutes), h (hours),
458           for example 20m or 1h.
459
460           The port can either be a single port number portid or a port range
461           portid-portid. The protocol can either be tcp, udp, sctp or dccp.
462           The destination address is a simple IP address.
463
464           The --timeout option is not combinable with the --permanent option.
465
466           For IPv6 forward ports, please use the rich language.
467
468           Note: IP forwarding will be implicitly enabled if toaddr is
469           specified.
470
471       [--permanent] [--zone=zone] [--permanent] [--policy=policy]
472       --remove-forward-port=port=portid[-portid]:proto=protocol[:toport=portid[-portid]][:toaddr=address[/mask]]
473           Remove the IPv4 forward port. This option can be specified multiple
474           times.
475
476           For IPv6 forward ports, please use the rich language.
477
478       [--permanent] [--zone=zone] [--permanent] [--policy=policy]
479       --query-forward-port=port=portid[-portid]:proto=protocol[:toport=portid[-portid]][:toaddr=address[/mask]]
480           Return whether the IPv4 forward port has been added. Returns 0 if
481           true, 1 otherwise.
482
483           For IPv6 forward ports, please use the rich language.
484
485       [--permanent] [--zone=zone] [--permanent] [--policy=policy]
486       --add-masquerade [--timeout=timeval]
487           Enable IPv4 masquerade. If a timeout is supplied, masquerading will
488           be active for the specified amount of time.  timeval is either a
489           number (of seconds) or number followed by one of characters s
490           (seconds), m (minutes), h (hours), for example 20m or 1h.
491           Masquerading is useful if the machine is a router and machines
492           connected over an interface in another zone should be able to use
493           the first connection.
494
495           The --timeout option is not combinable with the --permanent option.
496
497           For IPv6 masquerading, please use the rich language.
498
499           Note: IP forwarding will be implicitly enabled.
500
501           Note (Linux < 5.5): For the iptables backend, a policy may not
502           enable masquerade if an ingress zone has assigned interfaces. This
503           restriction does not exist for the nftables backend, but does
504           require Linux v5.5+ to function properly; otherwise it will
505           silently fail.
506
507       [--permanent] [--zone=zone] [--permanent] [--policy=policy]
508       --remove-masquerade
509           Disable IPv4 masquerade. If the masquerading was enabled with a
510           timeout, it will be disabled also.
511
512           For IPv6 masquerading, please use the rich language.
513
514       [--permanent] [--zone=zone] [--permanent] [--policy=policy]
515       --query-masquerade
516           Return whether IPv4 masquerading has been enabled. Returns 0 if
517           true, 1 otherwise.
518
519           For IPv6 masquerading, please use the rich language.
520
521       [--permanent] [--zone=zone] [--permanent] [--policy=policy]
522       --list-rich-rules
523           List rich language rules added as a newline separated list.
524
525       [--permanent] [--zone=zone] [--permanent] [--policy=policy]
526       --add-rich-rule='rule' [--timeout=timeval]
527           Add rich language rule 'rule'. This option can be specified
528           multiple times. If a timeout is supplied, the rule will be active
529           for the specified amount of time and will be removed automatically
530           afterwards.  timeval is either a number (of seconds) or number
531           followed by one of characters s (seconds), m (minutes), h (hours),
532           for example 20m or 1h.
533
534           For the rich language rule syntax, please have a look at
535           firewalld.richlanguage(5).
536
537           The --timeout option is not combinable with the --permanent option.
538
539       [--permanent] [--zone=zone] [--permanent] [--policy=policy]
540       --remove-rich-rule='rule'
541           Remove rich language rule 'rule'. This option can be specified
542           multiple times.
543
544           For the rich language rule syntax, please have a look at
545           firewalld.richlanguage(5).
546
547       [--permanent] [--zone=zone] [--permanent] [--policy=policy]
548       --query-rich-rule='rule'
549           Return whether a rich language rule 'rule' has been added. Returns
550           0 if true, 1 otherwise.
551
552           For the rich language rule syntax, please have a look at
553           firewalld.richlanguage(5).
554
555   Options to Adapt and Query Zones
556       Options in this section affect only one particular zone. If used with
557       --zone=zone option, they affect the specified zone. If the option is
558       omitted, they affect default zone (see --get-default-zone).
559
560       [--permanent] [--zone=zone] --add-icmp-block-inversion
561           Enable ICMP block inversion.
562
563       [--permanent] [--zone=zone] --remove-icmp-block-inversion
564           Disable ICMP block inversion.
565
566       [--permanent] [--zone=zone] --query-icmp-block-inversion
567           Return whether ICMP block inversion is enabled. Returns 0 if true,
568           1 otherwise.
569
570       [--permanent] [--zone=zone] --add-forward
571           Enable intra zone forwarding.
572
573       [--permanent] [--zone=zone] --remove-forward
574           Disable intra zone forwarding.
575
576       [--permanent] [--zone=zone] --query-forward
577           Return whether intra zone forwarding is enabled. Returns 0 if true,
578           1 otherwise.
579
580   Options to Adapt and Query Policies
581       Options in this section affect only one particular policy. It's
582       required to specify --policy=policy with these options.
583
584       --permanent --policy=policy --get-priority
585           Get the priority.
586
587       --permanent --policy=policy --set-priority=priority
588           Set the priority. The priority determines the relative ordering of
589           policies. This is an integer value between -32768 and 32767 where
590           -1 is the default value for new policies and 0 is reserved for
591           internal use.
592
593           If a priority is < 0, then the policy's rules will execute before
594           all rules in all zones.
595
596           If a priority is > 0, then the policy's rules will execute after
597           all rules in all zones.
598
599       [--permanent] --policy=policy --list-ingress-zones
600           List ingress zones added as a space separated list.
601
602       [--permanent] --policy=policy --add-ingress-zone=zone
603           Add an ingress zone. This option can be specified multiple times.
604
605           The ingress zone is one of the firewalld provided zones or one of
606           the pseudo-zones: HOST, ANY.
607
608           HOST is used for traffic originating from the host machine, i.e.
609           the host running firewalld.
610
611           ANY is used for traffic originating from any zone. This can be
612           thought of as a wild card for zones. However it does not include
613           traffic originating from the host machine - use HOST for that.
614
615       [--permanent] --policy=policy --remove-ingress-zone=zone
616           Remove an ingress zone. This option can be specified multiple
617           times.
618
619       [--permanent] --policy=policy --query-ingress-zone=zone
620           Return whether zone has been added. Returns 0 if true, 1 otherwise.
621
622       [--permanent] --policy=policy --list-egress-zones
623           List egress zones added as a space separated list.
624
625       [--permanent] --policy=policy --add-egress-zone=zone
626           Add an egress zone. This option can be specified multiple times.
627
628           The egress zone is one of the firewalld provided zones or one of
629           the pseudo-zones: HOST, ANY.
630
631           For clarification on HOST and ANY see option --add-ingress-zone.
632
633       [--permanent] --policy=policy --remove-egress-zone=zone
634           Remove an egress zone. This option can be specified multiple times.
635
636       [--permanent] --policy=policy --query-egress-zone=zone
637           Return whether zone has been added. Returns 0 if true, 1 otherwise.
638
639   Options to Handle Bindings of Interfaces
640       Binding an interface to a zone means that this zone settings are used
641       to restrict traffic via the interface.
642
643       Options in this section affect only one particular zone. If used with
644       --zone=zone option, they affect the zone zone. If the option is
645       omitted, they affect default zone (see --get-default-zone).
646
647       For a list of predefined zones use firewall-cmd --get-zones.
648
649       An interface name is a string up to 16 characters long, that may not
650       contain ' ', '/', '!' and '*'.
651
652       [--permanent] [--zone=zone] --list-interfaces
653           List interfaces that are bound to zone zone as a space separated
654           list. If zone is omitted, default zone will be used.
655
656       [--permanent] [--zone=zone] --add-interface=interface
657           Bind interface interface to zone zone. If zone is omitted, default
658           zone will be used.
659
660           If the interface is under control of NetworkManager, it is at first
661           connected to change the zone for the connection that is using the
662           interface. If this fails, the zone binding is created in firewalld
663           and the limitations below apply. For interfaces that are not under
664           control of NetworkManager, firewalld tries to change the ZONE
665           setting in the ifcfg file, if the file exists.
666
667           As a end user you don't need this in most cases, because
668           NetworkManager (or legacy network service) adds interfaces into
669           zones automatically (according to ZONE= option from ifcfg-interface
670           file) if NM_CONTROLLED=no is not set. You should do it only if
671           there's no /etc/sysconfig/network-scripts/ifcfg-interface file. If
672           there is such file and you add interface to zone with this
673           --add-interface option, make sure the zone is the same in both
674           cases, otherwise the behaviour would be undefined. Please also have
675           a look at the firewalld(1) man page in the Concepts section. For
676           permanent association of interface with a zone, see also 'How to
677           set or change a zone for a connection?' in firewalld.zones(5).
678
679       [--permanent] [--zone=zone] --change-interface=interface
680           If the interface is under control of NetworkManager, it is at first
681           connected to change the zone for the connection that is using the
682           interface. If this fails, the zone binding is created in firewalld
683           and the limitations below apply. For interfaces that are not under
684           control of NetworkManager, firewalld tries to change the ZONE
685           setting in the ifcfg file, if the file exists.
686
687           Change zone the interface interface is bound to to zone zone. It's
688           basically --remove-interface followed by --add-interface. If the
689           interface has not been bound to a zone before, it behaves like
690           --add-interface. If zone is omitted, default zone will be used.
691
692       [--permanent] [--zone=zone] --query-interface=interface
693           Query whether interface interface is bound to zone zone. Returns 0
694           if true, 1 otherwise.
695
696       [--permanent] --remove-interface=interface
697           If the interface is under control of NetworkManager, it is at first
698           connected to change the zone for the connection that is using the
699           interface. If this fails, the zone binding is created in firewalld
700           and the limitations below apply.
701
702           For the addition or change of interfaces that are not under control
703           of NetworkManager: firewalld tries to change the ZONE setting in
704           the ifcfg file, if an ifcfg file exists that is using the
705           interface.
706
707           Only for the removal of interfaces that are not under control of
708           NetworkManager: firewalld is not trying to change the ZONE setting
709           in the ifcfg file. This is needed to make sure that an ifdown of
710           the interface will not result in a reset of the zone setting to the
711           default zone. Only the zone binding is then removed in firewalld
712           then.
713
714           Remove binding of interface interface from zone it was previously
715           added to.
716
717   Options to Handle Bindings of Sources
718       Binding a source to a zone means that this zone settings will be used
719       to restrict traffic from this source.
720
721       A source address or address range is either an IP address or a network
722       IP address with a mask for IPv4 or IPv6 or a MAC address or an ipset
723       with the ipset: prefix. For IPv4, the mask can be a network mask or a
724       plain number. For IPv6 the mask is a plain number. The use of host
725       names is not supported.
726
727       Options in this section affect only one particular zone. If used with
728       --zone=zone option, they affect the zone zone. If the option is
729       omitted, they affect default zone (see --get-default-zone).
730
731       For a list of predefined zones use firewall-cmd [--permanent]
732       --get-zones.
733
734       [--permanent] [--zone=zone] --list-sources
735           List sources that are bound to zone zone as a space separated list.
736           If zone is omitted, default zone will be used.
737
738       [--permanent] [--zone=zone] --add-source=source[/mask]|MAC|ipset:ipset
739           Bind the source to zone zone. If zone is omitted, default zone will
740           be used.
741
742       [--zone=zone] --change-source=source[/mask]|MAC|ipset:ipset
743           Change zone the source is bound to to zone zone. It's basically
744           --remove-source followed by --add-source. If the source has not
745           been bound to a zone before, it behaves like --add-source. If zone
746           is omitted, default zone will be used.
747
748       [--permanent] [--zone=zone]
749       --query-source=source[/mask]|MAC|ipset:ipset
750           Query whether the source is bound to the zone zone. Returns 0 if
751           true, 1 otherwise.
752
753       [--permanent] --remove-source=source[/mask]|MAC|ipset:ipset
754           Remove binding of the source from zone it was previously added to.
755
756   IPSet Options
757       --get-ipset-types
758           Print the supported ipset types.
759
760       --permanent --new-ipset=ipset --type=type [--family=inet|inet6]
761       [--option=key[=value]]
762           Add a new permanent and empty ipset with specifying the type and
763           optional the family and options like timeout, hashsize and maxelem.
764           For more information please have a look at ipset(8) man page.
765
766           ipset names must be alphanumeric and may additionally include
767           characters: '_' and '-'.
768
769       --permanent --new-ipset-from-file=filename [--name=ipset]
770           Add a new permanent ipset from a prepared ipset file with an
771           optional name override.
772
773       --permanent --delete-ipset=ipset
774           Delete an existing permanent ipset.
775
776       --permanent --load-ipset-defaults=ipset
777           Load ipset default settings or report NO_DEFAULTS error.
778
779       [--permanent] --info-ipset=ipset
780           Print information about the ipset ipset. The output format is:
781
782               ipset
783                 type: type
784                 options: option1[=value1] ..
785                 entries: entry1 ..
786
787
788
789       [--permanent] --get-ipsets
790           Print predefined ipsets as a space separated list.
791
792       --permanent --ipset=ipset --set-description=description
793           Set new description to ipset
794
795       --permanent --ipset=ipset --get-description
796           Print description for ipset
797
798       --permanent --ipset=ipset --set-short=description
799           Set short description to ipset
800
801       --permanent --ipset=ipset --get-short
802           Print short description for ipset
803
804       [--permanent] --ipset=ipset --add-entry=entry
805           Add a new entry to the ipset.
806
807           Adding an entry to an ipset with option timeout is permitted, but
808           these entries are not tracked by firewalld.
809
810       [--permanent] --ipset=ipset --remove-entry=entry
811           Remove an entry from the ipset.
812
813       [--permanent] --ipset=ipset --query-entry=entry
814           Return whether the entry has been added to an ipset. Returns 0 if
815           true, 1 otherwise.
816
817           Querying an ipset with a timeout will yield an error. Entries are
818           not tracked for ipsets with a timeout.
819
820       [--permanent] --ipset=ipset --get-entries
821           List all entries of the ipset.
822
823       [--permanent] --ipset=ipset --add-entries-from-file=filename
824           Add a new entries to the ipset from the file. For all entries that
825           are listed in the file but already in the ipset, a warning will be
826           printed.
827
828           The file should contain an entry per line. Lines starting with an
829           hash or semicolon are ignored. Also empty lines.
830
831       [--permanent] --ipset=ipset --remove-entries-from-file=filename
832           Remove existing entries from the ipset from the file. For all
833           entries that are listed in the file but not in the ipset, a warning
834           will be printed.
835
836           The file should contain an entry per line. Lines starting with an
837           hash or semicolon are ignored. Also empty lines.
838
839       --permanent --path-ipset=ipset
840           Print path of the ipset configuration file.
841
842   Service Options
843       Options in this section affect only one particular service.
844
845       [--permanent] --info-service=service
846           Print information about the service service. The output format is:
847
848               service
849                 ports: port1 ..
850                 protocols: protocol1 ..
851                 source-ports: source-port1 ..
852                 helpers: helper1 ..
853                 destination: ipv1:address1 ..
854
855
856
857       The following options are only usable in the permanent configuration.
858
859       --permanent --new-service=service
860           Add a new permanent and empty service.
861
862           Service names must be alphanumeric and may additionally include
863           characters: '_' and '-'.
864
865       --permanent --new-service-from-file=filename [--name=service]
866           Add a new permanent service from a prepared service file with an
867           optional name override.
868
869       --permanent --delete-service=service
870           Delete an existing permanent service.
871
872       --permanent --load-service-defaults=service
873           Load service default settings or report NO_DEFAULTS error.
874
875       --permanent --path-service=service
876           Print path of the service configuration file.
877
878       --permanent --service=service --set-description=description
879           Set new description to service
880
881       --permanent --service=service --get-description
882           Print description for service
883
884       --permanent --service=service --set-short=description
885           Set short description to service
886
887       --permanent --service=service --get-short
888           Print short description for service
889
890       --permanent --service=service --add-port=portid[-portid]/protocol
891           Add a new port to the permanent service.
892
893       --permanent --service=service --remove-port=portid[-portid]/protocol
894           Remove a port from the permanent service.
895
896       --permanent --service=service --query-port=portid[-portid]/protocol
897           Return whether the port has been added to the permanent service.
898
899       --permanent --service=service --get-ports
900           List ports added to the permanent service.
901
902       --permanent --service=service --add-protocol=protocol
903           Add a new protocol to the permanent service.
904
905       --permanent --service=service --remove-protocol=protocol
906           Remove a protocol from the permanent service.
907
908       --permanent --service=service --query-protocol=protocol
909           Return whether the protocol has been added to the permanent
910           service.
911
912       --permanent --service=service --get-protocols
913           List protocols added to the permanent service.
914
915       --permanent --service=service
916       --add-source-port=portid[-portid]/protocol
917           Add a new source port to the permanent service.
918
919       --permanent --service=service
920       --remove-source-port=portid[-portid]/protocol
921           Remove a source port from the permanent service.
922
923       --permanent --service=service
924       --query-source-port=portid[-portid]/protocol
925           Return whether the source port has been added to the permanent
926           service.
927
928       --permanent --service=service --get-source-ports
929           List source ports added to the permanent service.
930
931       --permanent --service=service --add-helper=helper
932           Add a new helper to the permanent service.
933
934       --permanent --service=service --remove-helper=helper
935           Remove a helper from the permanent service.
936
937       --permanent --service=service --query-helper=helper
938           Return whether the helper has been added to the permanent service.
939
940       --permanent --service=service --get-service-helpers
941           List helpers added to the permanent service.
942
943       --permanent --service=service --set-destination=ipv:address[/mask]
944           Set destination for ipv to address[/mask] in the permanent service.
945
946       --permanent --service=service --remove-destination=ipv
947           Remove the destination for ipv from the permanent service.
948
949       --permanent --service=service --query-destination=ipv:address[/mask]
950           Return whether the destination ipv to address[/mask] has been set
951           in the permanent service.
952
953       --permanent --service=service --get-destinations
954           List destinations added to the permanent service.
955
956       --permanent --service=service --add-include=service
957           Add a new include to the permanent service.
958
959       --permanent --service=service --remove-include=service
960           Remove a include from the permanent service.
961
962       --permanent --service=service --query-include=service
963           Return whether the include has been added to the permanent service.
964
965       --permanent --service=service --get-includes
966           List includes added to the permanent service.
967
968   Helper Options
969       Options in this section affect only one particular helper.
970
971       [--permanent] --info-helper=helper
972           Print information about the helper helper. The output format is:
973
974               helper
975                 family: family
976                 module: module
977                 ports: port1 ..
978
979
980
981       The following options are only usable in the permanent configuration.
982
983       --permanent --new-helper=helper --module=nf_conntrack_module
984       [--family=ipv4|ipv6]
985           Add a new permanent helper with module and optionally family
986           defined.
987
988           Helper names must be alphanumeric and may additionally include
989           characters: '-'.
990
991       --permanent --new-helper-from-file=filename [--name=helper]
992           Add a new permanent helper from a prepared helper file with an
993           optional name override.
994
995       --permanent --delete-helper=helper
996           Delete an existing permanent helper.
997
998       --permanent --load-helper-defaults=helper
999           Load helper default settings or report NO_DEFAULTS error.
1000
1001       --permanent --path-helper=helper
1002           Print path of the helper configuration file.
1003
1004       [--permanent] --get-helpers
1005           Print predefined helpers as a space separated list.
1006
1007       --permanent --helper=helper --set-description=description
1008           Set new description to helper
1009
1010       --permanent --helper=helper --get-description
1011           Print description for helper
1012
1013       --permanent --helper=helper --set-short=description
1014           Set short description to helper
1015
1016       --permanent --helper=helper --get-short
1017           Print short description for helper
1018
1019       --permanent --helper=helper --add-port=portid[-portid]/protocol
1020           Add a new port to the permanent helper.
1021
1022       --permanent --helper=helper --remove-port=portid[-portid]/protocol
1023           Remove a port from the permanent helper.
1024
1025       --permanent --helper=helper --query-port=portid[-portid]/protocol
1026           Return whether the port has been added to the permanent helper.
1027
1028       --permanent --helper=helper --get-ports
1029           List ports added to the permanent helper.
1030
1031       --permanent --helper=helper --set-module=description
1032           Set module description for helper
1033
1034       --permanent --helper=helper --get-module
1035           Print module description for helper
1036
1037       --permanent --helper=helper --set-family=description
1038           Set family description for helper
1039
1040       --permanent --helper=helper --get-family
1041           Print family description of helper
1042
1043   Internet Control Message Protocol (ICMP) type Options
1044       Options in this section affect only one particular icmptype.
1045
1046       [--permanent] --info-icmptype=icmptype
1047           Print information about the icmptype icmptype. The output format
1048           is:
1049
1050               icmptype
1051                 destination: ipv1 ..
1052
1053
1054
1055       The following options are only usable in the permanent configuration.
1056
1057       --permanent --new-icmptype=icmptype
1058           Add a new permanent and empty icmptype.
1059
1060           ICMP type names must be alphanumeric and may additionally include
1061           characters: '_' and '-'.
1062
1063       --permanent --new-icmptype-from-file=filename [--name=icmptype]
1064           Add a new permanent icmptype from a prepared icmptype file with an
1065           optional name override.
1066
1067       --permanent --delete-icmptype=icmptype
1068           Delete an existing permanent icmptype.
1069
1070       --permanent --load-icmptype-defaults=icmptype
1071           Load icmptype default settings or report NO_DEFAULTS error.
1072
1073       --permanent --icmptype=icmptype --set-description=description
1074           Set new description to icmptype
1075
1076       --permanent --icmptype=icmptype --get-description
1077           Print description for icmptype
1078
1079       --permanent --icmptype=icmptype --set-short=description
1080           Set short description to icmptype
1081
1082       --permanent --icmptype=icmptype --get-short
1083           Print short description for icmptype
1084
1085       --permanent --icmptype=icmptype --add-destination=ipv
1086           Enable destination for ipv in permanent icmptype. ipv is one of
1087           ipv4 or ipv6.
1088
1089       --permanent --icmptype=icmptype --remove-destination=ipv
1090           Disable destination for ipv in permanent icmptype. ipv is one of
1091           ipv4 or ipv6.
1092
1093       --permanent --icmptype=icmptype --query-destination=ipv
1094           Return whether destination for ipv is enabled in permanent
1095           icmptype. ipv is one of ipv4 or ipv6.
1096
1097       --permanent --icmptype=icmptype --get-destinations
1098           List destinations in permanent icmptype.
1099
1100       --permanent --path-icmptype=icmptype
1101           Print path of the icmptype configuration file.
1102
1103   Direct Options
1104       DEPRECATED
1105           The direct interface has been deprecated. It will be removed in a
1106           future release. It is superseded by policies, see
1107           firewalld.policies(5).
1108
1109       The direct options give a more direct access to the firewall. These
1110       options require user to know basic iptables concepts, i.e.  table
1111       (filter/mangle/nat/...), chain (INPUT/OUTPUT/FORWARD/...), commands
1112       (-A/-D/-I/...), parameters (-p/-s/-d/-j/...) and targets
1113       (ACCEPT/DROP/REJECT/...).
1114
1115       Direct options should be used only as a last resort when it's not
1116       possible to use for example --add-service=service or
1117       --add-rich-rule='rule'.
1118
1119       Warning: Direct rules behavior is different depending on the value of
1120       FirewallBackend. See CAVEATS in firewalld.direct(5).
1121
1122       The first argument of each option has to be ipv4 or ipv6 or eb. With
1123       ipv4 it will be for IPv4 (iptables(8)), with ipv6 for IPv6
1124       (ip6tables(8)) and with eb for ethernet bridges (ebtables(8)).
1125
1126       [--permanent] --direct --get-all-chains
1127           Get all chains added to all tables. This option concerns only
1128           chains previously added with --direct --add-chain.
1129
1130       [--permanent] --direct --get-chains { ipv4 | ipv6 | eb } table
1131           Get all chains added to table table as a space separated list. This
1132           option concerns only chains previously added with --direct
1133           --add-chain.
1134
1135       [--permanent] --direct --add-chain { ipv4 | ipv6 | eb } table chain
1136           Add a new chain with name chain to table table. Make sure there's
1137           no other chain with this name already.
1138
1139           There already exist basic chains to use with direct options, for
1140           example INPUT_direct chain (see iptables-save | grep direct output
1141           for all of them). These chains are jumped into before chains for
1142           zones, i.e. every rule put into INPUT_direct will be checked before
1143           rules in zones.
1144
1145       [--permanent] --direct --remove-chain { ipv4 | ipv6 | eb } table chain
1146           Remove chain with name chain from table table. Only chains
1147           previously added with --direct --add-chain can be removed this way.
1148
1149       [--permanent] --direct --query-chain { ipv4 | ipv6 | eb } table chain
1150           Return whether a chain with name chain exists in table table.
1151           Returns 0 if true, 1 otherwise. This option concerns only chains
1152           previously added with --direct --add-chain.
1153
1154       [--permanent] --direct --get-all-rules
1155           Get all rules added to all chains in all tables as a newline
1156           separated list of the priority and arguments. This option concerns
1157           only rules previously added with --direct --add-rule.
1158
1159       [--permanent] --direct --get-rules { ipv4 | ipv6 | eb } table chain
1160           Get all rules added to chain chain in table table as a newline
1161           separated list of the priority and arguments. This option concerns
1162           only rules previously added with --direct --add-rule.
1163
1164       [--permanent] --direct --add-rule { ipv4 | ipv6 | eb } table chain
1165       priority args
1166           Add a rule with the arguments args to chain chain in table table
1167           with priority priority.
1168
1169           The priority is used to order rules. Priority 0 means add rule on
1170           top of the chain, with a higher priority the rule will be added
1171           further down. Rules with the same priority are on the same level
1172           and the order of these rules is not fixed and may change. If you
1173           want to make sure that a rule will be added after another one, use
1174           a low priority for the first and a higher for the following.
1175
1176       [--permanent] --direct --remove-rule { ipv4 | ipv6 | eb } table chain
1177       priority args
1178           Remove a rule with priority and the arguments args from chain chain
1179           in table table. Only rules previously added with --direct
1180           --add-rule can be removed this way.
1181
1182       [--permanent] --direct --remove-rules { ipv4 | ipv6 | eb } table chain
1183           Remove all rules in the chain with name chain exists in table
1184           table. This option concerns only rules previously added with
1185           --direct --add-rule in this chain.
1186
1187       [--permanent] --direct --query-rule { ipv4 | ipv6 | eb } table chain
1188       priority args
1189           Return whether a rule with priority and the arguments args exists
1190           in chain chain in table table. Returns 0 if true, 1 otherwise. This
1191           option concerns only rules previously added with --direct
1192           --add-rule.
1193
1194       --direct --passthrough { ipv4 | ipv6 | eb } args
1195           Pass a command through to the firewall.  args can be all iptables,
1196           ip6tables and ebtables command line arguments. This command is
1197           untracked, which means that firewalld is not able to provide
1198           information about this command later on, also not a listing of the
1199           untracked passthoughs.
1200
1201       [--permanent] --direct --get-all-passthroughs
1202           Get all passthrough rules as a newline separated list of the ipv
1203           value and arguments.
1204
1205       [--permanent] --direct --get-passthroughs { ipv4 | ipv6 | eb }
1206           Get all passthrough rules for the ipv value as a newline separated
1207           list of the priority and arguments.
1208
1209       [--permanent] --direct --add-passthrough { ipv4 | ipv6 | eb } args
1210           Add a passthrough rule with the arguments args for the ipv value.
1211
1212       [--permanent] --direct --remove-passthrough { ipv4 | ipv6 | eb } args
1213           Remove a passthrough rule with the arguments args for the ipv
1214           value.
1215
1216       [--permanent] --direct --query-passthrough { ipv4 | ipv6 | eb } args
1217           Return whether a passthrough rule with the arguments args exists
1218           for the ipv value. Returns 0 if true, 1 otherwise.
1219
1220   Lockdown Options
1221       Local applications or services are able to change the firewall
1222       configuration if they are running as root (example: libvirt) or are
1223       authenticated using PolicyKit. With this feature administrators can
1224       lock the firewall configuration so that only applications on lockdown
1225       whitelist are able to request firewall changes.
1226
1227       The lockdown access check limits D-Bus methods that are changing
1228       firewall rules. Query, list and get methods are not limited.
1229
1230       The lockdown feature is a very light version of user and application
1231       policies for firewalld and is turned off by default.
1232
1233       --lockdown-on
1234           Enable lockdown. Be careful - if firewall-cmd is not on lockdown
1235           whitelist when you enable lockdown you won't be able to disable it
1236           again with firewall-cmd, you would need to edit firewalld.conf.
1237
1238           This is a runtime and permanent change.
1239
1240       --lockdown-off
1241           Disable lockdown.
1242
1243           This is a runtime and permanent change.
1244
1245       --query-lockdown
1246           Query whether lockdown is enabled. Returns 0 if lockdown is
1247           enabled, 1 otherwise.
1248
1249   Lockdown Whitelist Options
1250       The lockdown whitelist can contain commands, contexts, users and user
1251       ids.
1252
1253       If a command entry on the whitelist ends with an asterisk '*', then all
1254       command lines starting with the command will match. If the '*' is not
1255       there the absolute command inclusive arguments must match.
1256
1257       Command paths for users are not always the same and depends on the
1258       users PATH. Some distributions symlink /bin to /usr/bin in which case
1259       it depends on the order they appear in the PATH environment variable.
1260
1261       The context is the security (SELinux) context of a running application
1262       or service. To get the context of a running application use ps -e
1263       --context.
1264
1265       Warning: If the context is unconfined, then this will open access for
1266       more than the desired application.
1267
1268       The lockdown whitelist entries are checked in the following order:
1269           1. context
1270           2. uid
1271           3. user
1272           4. command
1273
1274       [--permanent] --list-lockdown-whitelist-commands
1275           List all command lines that are on the whitelist.
1276
1277       [--permanent] --add-lockdown-whitelist-command=command
1278           Add the command to the whitelist.
1279
1280       [--permanent] --remove-lockdown-whitelist-command=command
1281           Remove the command from the whitelist.
1282
1283       [--permanent] --query-lockdown-whitelist-command=command
1284           Query whether the command is on the whitelist. Returns 0 if true, 1
1285           otherwise.
1286
1287       [--permanent] --list-lockdown-whitelist-contexts
1288           List all contexts that are on the whitelist.
1289
1290       [--permanent] --add-lockdown-whitelist-context=context
1291           Add the context context to the whitelist.
1292
1293       [--permanent] --remove-lockdown-whitelist-context=context
1294           Remove the context from the whitelist.
1295
1296       [--permanent] --query-lockdown-whitelist-context=context
1297           Query whether the context is on the whitelist. Returns 0 if true, 1
1298           otherwise.
1299
1300       [--permanent] --list-lockdown-whitelist-uids
1301           List all user ids that are on the whitelist.
1302
1303       [--permanent] --add-lockdown-whitelist-uid=uid
1304           Add the user id uid to the whitelist.
1305
1306       [--permanent] --remove-lockdown-whitelist-uid=uid
1307           Remove the user id uid from the whitelist.
1308
1309       [--permanent] --query-lockdown-whitelist-uid=uid
1310           Query whether the user id uid is on the whitelist. Returns 0 if
1311           true, 1 otherwise.
1312
1313       [--permanent] --list-lockdown-whitelist-users
1314           List all user names that are on the whitelist.
1315
1316       [--permanent] --add-lockdown-whitelist-user=user
1317           Add the user name user to the whitelist.
1318
1319       [--permanent] --remove-lockdown-whitelist-user=user
1320           Remove the user name user from the whitelist.
1321
1322       [--permanent] --query-lockdown-whitelist-user=user
1323           Query whether the user name user is on the whitelist. Returns 0 if
1324           true, 1 otherwise.
1325
1326   Panic Options
1327       --panic-on
1328           Enable panic mode. All incoming and outgoing packets are dropped,
1329           active connections will expire. Enable this only if there are
1330           serious problems with your network environment. For example if the
1331           machine is getting hacked in.
1332
1333           This is a runtime only change.
1334
1335       --panic-off
1336           Disable panic mode. After disabling panic mode established
1337           connections might work again, if panic mode was enabled for a short
1338           period of time.
1339
1340           This is a runtime only change.
1341
1342       --query-panic
1343           Returns 0 if panic mode is enabled, 1 otherwise.
1344

EXAMPLES

1346       For more examples see http://fedoraproject.org/wiki/FirewallD
1347
1348   Example 1
1349       Enable http service in default zone. This is runtime only change, i.e.
1350       effective until restart.
1351
1352           firewall-cmd --add-service=http
1353
1354
1355
1356   Example 2
1357       Enable port 443/tcp immediately and permanently in default zone. To
1358       make the change effective immediately and also after restart we need
1359       two commands. The first command makes the change in runtime
1360       configuration, i.e. makes it effective immediately, until restart. The
1361       second command makes the change in permanent configuration, i.e. makes
1362       it effective after restart.
1363
1364           firewall-cmd --add-port=443/tcp
1365           firewall-cmd --permanent --add-port=443/tcp
1366
1367
1368

EXIT CODES

1370       On success 0 is returned. On failure the output is red colored and exit
1371       code is either 2 in case of wrong command-line option usage or one of
1372       the following error codes in other cases:
1373
1374       ┌────────────────────┬──────┐
1375String              Code 
1376       ├────────────────────┼──────┤
1377       │ALREADY_ENABLED     │   11 │
1378       ├────────────────────┼──────┤
1379       │NOT_ENABLED         │   12 │
1380       ├────────────────────┼──────┤
1381       │COMMAND_FAILED      │   13 │
1382       ├────────────────────┼──────┤
1383       │NO_IPV6_NAT         │   14 │
1384       ├────────────────────┼──────┤
1385       │PANIC_MODE          │   15 │
1386       ├────────────────────┼──────┤
1387       │ZONE_ALREADY_SET    │   16 │
1388       ├────────────────────┼──────┤
1389       │UNKNOWN_INTERFACE   │   17 │
1390       ├────────────────────┼──────┤
1391       │ZONE_CONFLICT       │   18 │
1392       ├────────────────────┼──────┤
1393       │BUILTIN_CHAIN       │   19 │
1394       ├────────────────────┼──────┤
1395       │EBTABLES_NO_REJECT  │   20 │
1396       ├────────────────────┼──────┤
1397       │NOT_OVERLOADABLE    │   21 │
1398       ├────────────────────┼──────┤
1399       │NO_DEFAULTS         │   22 │
1400       ├────────────────────┼──────┤
1401       │BUILTIN_ZONE        │   23 │
1402       ├────────────────────┼──────┤
1403       │BUILTIN_SERVICE     │   24 │
1404       ├────────────────────┼──────┤
1405       │BUILTIN_ICMPTYPE    │   25 │
1406       ├────────────────────┼──────┤
1407       │NAME_CONFLICT       │   26 │
1408       ├────────────────────┼──────┤
1409       │NAME_MISMATCH       │   27 │
1410       ├────────────────────┼──────┤
1411       │PARSE_ERROR         │   28 │
1412       ├────────────────────┼──────┤
1413       │ACCESS_DENIED       │   29 │
1414       ├────────────────────┼──────┤
1415       │UNKNOWN_SOURCE      │   30 │
1416       ├────────────────────┼──────┤
1417       │RT_TO_PERM_FAILED   │   31 │
1418       ├────────────────────┼──────┤
1419       │IPSET_WITH_TIMEOUT  │   32 │
1420       ├────────────────────┼──────┤
1421       │BUILTIN_IPSET       │   33 │
1422       ├────────────────────┼──────┤
1423       │ALREADY_SET         │   34 │
1424       ├────────────────────┼──────┤
1425       │MISSING_IMPORT      │   35 │
1426       ├────────────────────┼──────┤
1427       │DBUS_ERROR          │   36 │
1428       ├────────────────────┼──────┤
1429       │BUILTIN_HELPER      │   37 │
1430       ├────────────────────┼──────┤
1431       │NOT_APPLIED         │   38 │
1432       ├────────────────────┼──────┤
1433       │INVALID_ACTION      │  100 │
1434       ├────────────────────┼──────┤
1435       │INVALID_SERVICE     │  101 │
1436       ├────────────────────┼──────┤
1437       │INVALID_PORT        │  102 │
1438       ├────────────────────┼──────┤
1439       │INVALID_PROTOCOL    │  103 │
1440       ├────────────────────┼──────┤
1441       │INVALID_INTERFACE   │  104 │
1442       ├────────────────────┼──────┤
1443       │INVALID_ADDR        │  105 │
1444       ├────────────────────┼──────┤
1445       │INVALID_FORWARD     │  106 │
1446       ├────────────────────┼──────┤
1447       │INVALID_ICMPTYPE    │  107 │
1448       ├────────────────────┼──────┤
1449       │INVALID_TABLE       │  108 │
1450       ├────────────────────┼──────┤
1451       │INVALID_CHAIN       │  109 │
1452       ├────────────────────┼──────┤
1453       │INVALID_TARGET      │  110 │
1454       ├────────────────────┼──────┤
1455       │INVALID_IPV         │  111 │
1456       ├────────────────────┼──────┤
1457       │INVALID_ZONE        │  112 │
1458       ├────────────────────┼──────┤
1459       │INVALID_PROPERTY    │  113 │
1460       ├────────────────────┼──────┤
1461       │INVALID_VALUE       │  114 │
1462       ├────────────────────┼──────┤
1463       │INVALID_OBJECT      │  115 │
1464       ├────────────────────┼──────┤
1465       │INVALID_NAME        │  116 │
1466       ├────────────────────┼──────┤
1467       │INVALID_FILENAME    │  117 │
1468       ├────────────────────┼──────┤
1469       │INVALID_DIRECTORY   │  118 │
1470       ├────────────────────┼──────┤
1471       │INVALID_TYPE        │  119 │
1472       ├────────────────────┼──────┤
1473       │INVALID_SETTING     │  120 │
1474       ├────────────────────┼──────┤
1475       │INVALID_DESTINATION │  121 │
1476       ├────────────────────┼──────┤
1477       │INVALID_RULE        │  122 │
1478       ├────────────────────┼──────┤
1479       │INVALID_LIMIT       │  123 │
1480       ├────────────────────┼──────┤
1481       │INVALID_FAMILY      │  124 │
1482       ├────────────────────┼──────┤
1483       │INVALID_LOG_LEVEL   │  125 │
1484       ├────────────────────┼──────┤
1485       │INVALID_AUDIT_TYPE  │  126 │
1486       ├────────────────────┼──────┤
1487       │INVALID_MARK        │  127 │
1488       ├────────────────────┼──────┤
1489       │INVALID_CONTEXT     │  128 │
1490       ├────────────────────┼──────┤
1491       │INVALID_COMMAND     │  129 │
1492       ├────────────────────┼──────┤
1493       │INVALID_USER        │  130 │
1494       ├────────────────────┼──────┤
1495       │INVALID_UID         │  131 │
1496       ├────────────────────┼──────┤
1497       │INVALID_MODULE      │  132 │
1498       ├────────────────────┼──────┤
1499       │INVALID_PASSTHROUGH │  133 │
1500       ├────────────────────┼──────┤
1501       │INVALID_MAC         │  134 │
1502       ├────────────────────┼──────┤
1503       │INVALID_IPSET       │  135 │
1504       ├────────────────────┼──────┤
1505       │INVALID_ENTRY       │  136 │
1506       ├────────────────────┼──────┤
1507       │INVALID_OPTION      │  137 │
1508       ├────────────────────┼──────┤
1509       │INVALID_HELPER      │  138 │
1510       ├────────────────────┼──────┤
1511       │INVALID_PRIORITY    │  139 │
1512       ├────────────────────┼──────┤
1513       │INVALID_POLICY      │  140 │
1514       ├────────────────────┼──────┤
1515       │INVALID_LOG_PREFIX  │  141 │
1516       ├────────────────────┼──────┤
1517       │INVALID_NFLOG_GROUP │  142 │
1518       ├────────────────────┼──────┤
1519       │INVALID_NFLOG_QUEUE │  143 │
1520       ├────────────────────┼──────┤
1521       │MISSING_TABLE       │  200 │
1522       ├────────────────────┼──────┤
1523       │MISSING_CHAIN       │  201 │
1524       ├────────────────────┼──────┤
1525       │MISSING_PORT        │  202 │
1526       ├────────────────────┼──────┤
1527       │MISSING_PROTOCOL    │  203 │
1528       ├────────────────────┼──────┤
1529       │MISSING_ADDR        │  204 │
1530       ├────────────────────┼──────┤
1531       │MISSING_NAME        │  205 │
1532       ├────────────────────┼──────┤
1533       │MISSING_SETTING     │  206 │
1534       ├────────────────────┼──────┤
1535       │MISSING_FAMILY      │  207 │
1536       ├────────────────────┼──────┤
1537       │RUNNING_BUT_FAILED  │  251 │
1538       ├────────────────────┼──────┤
1539       │NOT_RUNNING         │  252 │
1540       ├────────────────────┼──────┤
1541       │NOT_AUTHORIZED      │  253 │
1542       ├────────────────────┼──────┤
1543       │UNKNOWN_ERROR       │  254 │
1544       └────────────────────┴──────┘
1545
1546       Note that return codes of --query-* options are special: Successful
1547       queries return 0, unsuccessful ones return 1 unless an error occurred
1548       in which case the table above applies.
1549

SEE ALSO

1551       firewall-applet(1), firewalld(1), firewall-cmd(1), firewall-config(1),
1552       firewalld.conf(5), firewalld.direct(5), firewalld.dbus(5),
1553       firewalld.icmptype(5), firewalld.lockdown-whitelist(5), firewall-
1554       offline-cmd(1), firewalld.richlanguage(5), firewalld.service(5),
1555       firewalld.zone(5), firewalld.zones(5), firewalld.policy(5),
1556       firewalld.policies(5), firewalld.ipset(5), firewalld.helper(5)
1557

NOTES

1559       firewalld home page:
1560           http://firewalld.org
1561
1562       More documentation with examples:
1563           http://fedoraproject.org/wiki/FirewallD
1564

AUTHORS

1566       Thomas Woerner <twoerner@redhat.com>
1567           Developer
1568
1569       Jiri Popelka <jpopelka@redhat.com>
1570           Developer
1571
1572       Eric Garver <eric@garver.life>
1573           Developer
1574
1575
1576
1577firewalld 1.3.4                                                FIREWALL-CMD(1)
Impressum