# firewalld.policy

firewalld &authors;
firewalld.policy
5

# firewalld.policy

firewalld policy configuration files

`/firewalld/policies/policy.xml`

`/lib/firewalld/policies/policy.xml`

## Description

A firewalld policy configuration file contains the information for a policy. These are the policy descriptions, services, ports, protocols, icmp-blocks, masquerade, forward-ports and rich language rules in an XML file format. The file name has to be policy_name.xml where length of policy_name is currently limited to 17 chars.

This is the structure of a policy configuration file:

    <?xml version="1.0" encoding="utf-8"?>
    <policy [version="versionstring"] [target="CONTINUE|ACCEPT|REJECT|DROP"] [priority="priority"]>
        [ <ingress-zone name="zone"/> ]
        [ <egress-zone name="zone"/> ]

        &policy_zone_syntax;

    </policy>

The config can contain these tags and attributes. Some of them are mandatory, others optional.

### policy

The mandatory policy start and end tag defines the policy. This tag can only be used once in a policy configuration file. There are optional attributes for policy:

version="string"

  To give the policy a version.

target="`CONTINUE`|`ACCEPT`|`REJECT`|`DROP`"

  Can be used to accept, reject or drop every packet that doesn't match any rule (port, service, etc.). The `CONTINUE` is the default and used for policies that are non-terminal.

### ingress-zone

An optional element that can be used several times. It can be the name of a firewalld zone or one of the symbolic zones: HOST, ANY. See firewalld.policies 5 for information about symbolic zones.

### egress-zone

An optional element that can be used several times. It can be the name of a firewalld zone or one of the symbolic zones: HOST, ANY. See firewalld.policies 5 for information about symbolic zones.

&policy_zone_descriptions;

&seealso;

&notes;