<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of firewalld.
Copyright (C) 2020 Red Hat, Inc.
Authors:
Eric Garver <eric@garver.life>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
[ <short><replaceable>short description</replaceable></short> ]
[ <description><replaceable>description</replaceable></description> ]
[ <service name="<replaceable>string</replaceable>"/> ]
[ <port port="<replaceable>portid</replaceable>[-<replaceable>portid</replaceable>]" protocol="<literal>tcp</literal>|<literal>udp</literal>|<literal>sctp</literal>|<literal>dccp</literal>"/> ]
[ <protocol value="<replaceable>protocol</replaceable>"/> ]
[ <icmp-block name="<replaceable>string</replaceable>"/> ]
[ <masquerade/> ]
[ <forward-port port="<replaceable>portid</replaceable>[-<replaceable>portid</replaceable>]" protocol="<literal>tcp</literal>|<literal>udp</literal>|<literal>sctp</literal>|<literal>dccp</literal>" [to-port="<replaceable>portid</replaceable>[-<replaceable>portid</replaceable>]"] [to-addr="<replaceable>IP address</replaceable>"]/> ]
[ <source-port port="<replaceable>portid</replaceable>[-<replaceable>portid</replaceable>]" protocol="<literal>tcp</literal>|<literal>udp</literal>|<literal>sctp</literal>|<literal>dccp</literal>"/> ]
[
<rule [family="<literal>ipv4</literal>|<literal>ipv6</literal>"]>
[ <source address="<replaceable>address</replaceable>[/<replaceable>mask</replaceable>]"|mac="<replaceable>MAC</replaceable>"|ipset="<replaceable>ipset</replaceable>" [invert="<replaceable>True</replaceable>"]/> ]
[ <destination address="<replaceable>address</replaceable>[/<replaceable>mask</replaceable>]" [invert="<replaceable>True</replaceable>"]/> ]
[
<service name="<replaceable>string</replaceable>"/> |
<port port="<replaceable>portid</replaceable>[-<replaceable>portid</replaceable>]" protocol="<literal>tcp</literal>|<literal>udp</literal>|<literal>sctp</literal>|<literal>dccp</literal>"/> |
<protocol value="<replaceable>protocol</replaceable>"/> |
<icmp-block name="<replaceable>icmptype</replaceable>"/> |
<icmp-type name="<replaceable>icmptype</replaceable>"/> |
<masquerade/> |
<forward-port port="<replaceable>portid</replaceable>[-<replaceable>portid</replaceable>]" protocol="<literal>tcp</literal>|<literal>udp</literal>|<literal>sctp</literal>|<literal>dccp</literal>" [to-port="<replaceable>portid</replaceable>[-<replaceable>portid</replaceable>]"] [to-addr="<replaceable>address</replaceable>"]/>
]
[ <log [prefix="<replaceable>prefixtext</replaceable>"] [level="<literal>emerg</literal>|<literal>alert</literal>|<literal>crit</literal>|<literal>err</literal>|<literal>warn</literal>|<literal>notice</literal>|<literal>info</literal>|<literal>debug</literal>"]> [<limit value="<replaceable>rate</replaceable>/<replaceable>duration</replaceable>"/>] </log> ]
[ <audit> [<limit value="<replaceable>rate</replaceable>/<replaceable>duration</replaceable>"/>] </audit> ]
[
<accept> [<limit value="<replaceable>rate</replaceable>/<replaceable>duration</replaceable>"/>] </accept> |
<reject [type="<replaceable>rejecttype</replaceable>"]> [<limit value="<replaceable>rate</replaceable>/<replaceable>duration</replaceable>"/>] </reject> |
<drop> [<limit value="<replaceable>rate</replaceable>/<replaceable>duration</replaceable>"/>] </drop> |
<mark set="<replaceable>mark</replaceable>[/<replaceable>mask</replaceable>]"> [<limit value="<replaceable>rate</replaceable>/<replaceable>duration</replaceable>"/>] </mark>
]
</rule>
]