'\" t .\" Title: firewalld.policies .\" Author: Thomas Woerner .\" Generator: DocBook XSL Stylesheets vsnapshot .\" Date: .\" Manual: firewalld.policies .\" Source: firewalld 1.3.0 .\" Language: English .\" .TH "FIREWALLD\&.POLICIES" "5" "" "firewalld 1.3.0" "firewalld.policies" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" firewalld.policies \- firewalld policies .SH "DESCRIPTION" .SS "What is a policy?" .PP A policy applies a set of rules to traffic flowing between between zones (see zones (see \fBfirewalld.zones\fR(5))\&. The policy affects traffic in a stateful unidirectional manner, e\&.g\&. zoneA to zoneB\&. This allows asynchronous filtering policies\&. .PP A policy\*(Aqs relationship to zones is defined by assigning a set of ingress zones and a set of egress zones\&. For example, if the set of ingress zones contains "public" and the set of egress zones contains "internal" then the policy will affect all traffic flowing from the "public" zone to the "internal" zone\&. However, since policies are unidirectional it will not apply to traffic flowing from "internal" to "public"\&. Note that the ingress set and egress set can contain multiple zones\&. .SS "Active Policies" .PP Policies only become active if all of the following are true\&. .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} The ingress zones list contain at least one regular zone or a single symbolic zone\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} The egress zones list contain at least one regular zone or a single symbolic zone\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} For non symbolic zones, the zone must be active\&. That is, it must have interfaces or sources assigned to it\&. .RE .PP If the policy is not active then the policy has no effect\&. .SS "Symbolic Zones" .PP Regular zones are not enough to express every form of packet filtering\&. For example there is no zone to represent traffic flowing to or from the host running firewalld\&. As such, there are some symbolic zones to fill these gaps\&. However, symbolic zones are unique in that they\*(Aqre the only zone allowed in the ingress or egress zone sets\&. For example, you cannot use "public" and "HOST" in the ingress zones\&. .PP Symbolic zones: .sp .RS 4 .ie n \{\ \h'-04' 1.\h'+01'\c .\} .el \{\ .sp -1 .IP " 1." 4.2 .\} HOST .sp This symbolic zone is for traffic flowing to or from the host running firewalld\&. This corresponds to netfilter (iptables/nftables) chains INPUT and OUTPUT\&. .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} If used in the egress zones list it will apply to traffic on the INPUT chain\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} If used in the ingress zones list it will apply to traffic on the OUTPUT chain\&. .RE .RE .sp .RS 4 .ie n \{\ \h'-04' 2.\h'+01'\c .\} .el \{\ .sp -1 .IP " 2." 4.2 .\} ANY .sp This symbolic zone behaves like a wildcard for the ingress and egress zones\&. With the exception that it does not include "HOST"\&. It\*(Aqs useful if you want a policy to apply to every zone\&. .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} If used in the ingress zones list it will apply for traffic originating from any zone\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} If used in the egress zones list it will apply for traffic destined to any zone\&. .RE .RE .SS "Predefined Policies" .PP firewalld ships with some predefined policies\&. These may or may not be active by default\&. For details see the description of each policy\&. .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} allow\-host\-ipv6 .RE .SS "Similarity to Zones" .PP Policies are similar to zones in that they are an attachment point for firewalld\*(Aqs primitives: services, ports, forward ports, etc\&. This is not a coincidence\&. Policies are a generalization of how zones have traditionally achieved filtering\&. In fact, in modern firewalld zones are internally implemented as a set of policies\&. .PP The main difference between policies and zones is that policies allow filtering in all directions: input, output, and forwarding\&. With a couple of exceptions zones only allow input filtering which is sufficient for an end station firewalling\&. However, for network level filtering or filtering on behalf of virtual machines and containers something more flexible, i\&.e\&. policies, are needed\&. .SH "SEE ALSO" \fBfirewall-applet\fR(1), \fBfirewalld\fR(1), \fBfirewall-cmd\fR(1), \fBfirewall-config\fR(1), \fBfirewalld.conf\fR(5), \fBfirewalld.direct\fR(5), \fBfirewalld.dbus\fR(5), \fBfirewalld.icmptype\fR(5), \fBfirewalld.lockdown-whitelist\fR(5), \fBfirewall-offline-cmd\fR(1), \fBfirewalld.richlanguage\fR(5), \fBfirewalld.service\fR(5), \fBfirewalld.zone\fR(5), \fBfirewalld.zones\fR(5), \fBfirewalld.policy\fR(5), \fBfirewalld.policies\fR(5), \fBfirewalld.ipset\fR(5), \fBfirewalld.helper\fR(5) .SH "NOTES" .PP firewalld home page: .RS 4 \m[blue]\fB\%http://firewalld.org\fR\m[] .RE .PP More documentation with examples: .RS 4 \m[blue]\fB\%http://fedoraproject.org/wiki/FirewallD\fR\m[] .RE .SH "AUTHORS" .PP \fBThomas Woerner\fR <\&twoerner@redhat\&.com\&> .RS 4 Developer .RE .PP \fBJiri Popelka\fR <\&jpopelka@redhat\&.com\&> .RS 4 Developer .RE .PP \fBEric Garver\fR <\&eric@garver\&.life\&> .RS 4 Developer .RE