aboutsummaryrefslogtreecommitdiff
path: root/en_US.ISO8859-1/books/handbook/firewalls
diff options
context:
space:
mode:
authorDru Lavigne <dru@FreeBSD.org>2014-02-21 20:28:01 +0000
committerDru Lavigne <dru@FreeBSD.org>2014-02-21 20:28:01 +0000
commit761c663a46cb92019f837822600e4fd4447ab434 (patch)
treed54c4d7ee9c6dd58a7a06f4c9cba74bb288a9ad8 /en_US.ISO8859-1/books/handbook/firewalls
parent52b27f712ce745e092add894bd58d970086a0758 (diff)
downloaddoc-761c663a46cb92019f837822600e4fd4447ab434.tar.gz
doc-761c663a46cb92019f837822600e4fd4447ab434.zip
Modernize the next bit of syntax. More to come.
Sponsored by: iXsystems
Notes
Notes: svn path=/head/; revision=44019
Diffstat (limited to 'en_US.ISO8859-1/books/handbook/firewalls')
-rw-r--r--en_US.ISO8859-1/books/handbook/firewalls/chapter.xml82
1 files changed, 47 insertions, 35 deletions
diff --git a/en_US.ISO8859-1/books/handbook/firewalls/chapter.xml b/en_US.ISO8859-1/books/handbook/firewalls/chapter.xml
index 8220cb7903..5ace4591e7 100644
--- a/en_US.ISO8859-1/books/handbook/firewalls/chapter.xml
+++ b/en_US.ISO8859-1/books/handbook/firewalls/chapter.xml
@@ -1622,7 +1622,7 @@ options IPFILTER_DEFAULT_BLOCK</programlisting>
for <application>IPFILTER</application>,
<literal>options IPFILTER_LOG</literal> enables
<application>IPF</application> logging using the
- <filename>ipl</filename> packet logging pseudo device for
+ <filename>ipl</filename> packet logging pseudo-device for
every rule that has the <literal>log</literal> keyword,
<literal>IPFILTER_LOOKUP</literal> enables
<acronym>IP</acronym> pools in order to speed up
@@ -1711,8 +1711,8 @@ ipnat_rules="/etc/ipnat.rules" # rules definition file for ipnat</programlist
<!-- This section is probably wrong. See the OpenBSD flag -->
<!-- What is the "OpenBSD flag"? Reference please -->
- <para><replaceable>ACTION IN-OUT OPTIONS SELECTION STATEFUL
- PROTO SRC_ADDR,DST_ADDR OBJECT PORT_NUM TCP_FLAG
+ <para><replaceable>ACTION DIRECTION OPTIONS proto PROTO_TYPE
+ from SRC_ADDR SRC_PORT to DST_ADDR DST_PORT OBJECT PORT_NUM TCP_FLAG
STATEFUL</replaceable></para>
<para>This section describes each keyword and its options.</para>
@@ -1749,7 +1749,7 @@ ipnat_rules="/etc/ipnat.rules" # rules definition file for ipnat</programlist
</varlistentry>
<varlistentry>
- <term>IN-OUT</term>
+ <term>DIRECTION</term>
<listitem>
<para>Next, each rule must
explicitly state the direction of traffic using one of
@@ -1773,39 +1773,35 @@ ipnat_rules="/etc/ipnat.rules" # rules definition file for ipnat</programlist
<varlistentry>
<term>OPTIONS</term>
<listitem>
- <note>
- <para>These options must be used in the order shown
+ <para>Options are optional. However, if multiple options
+ are specified, they must be used in the order shown
here.</para>
- </note>
- <para><literal>log</literal> indicates that the packet
- header will be written to the &man.ipl.4; packet log
- pseudo-device if the selection parameters match the
- packet.</para>
+ <para><literal>log</literal>: when performing the
+ specified ACTION, the contents of the packet's
+ headers will be written to the &man.ipl.4; packet log
+ pseudo-device.</para>
- <para><literal>quick</literal> indicates that if the
- selection parameters match the packet, this rule will be
- the last rule checked, and no further processing of any
+ <para><literal>quick</literal>: if
+ a packet matches this rule, the ACTION specified by the
+ rule occurs and no further processing of any
following rules will occur for this packet.</para>
- <para><literal>on</literal> indicates the interface name
- to be incorporated into the selection parameters.
- Interface names are as displayed by &man.ifconfig.8;.
- Using this option, the rule will only match if the
- packet is going through that interface in the specified
+ <para><literal>on</literal>: must be followed by the interface name
+ as displayed by &man.ifconfig.8;.
+ The rule will only match if the
+ packet is going through the specified interface in the specified
direction.</para>
- <para>When a packet is logged, the headers of the packet
- are written to the &man.ipl.4; packet logging
- pseudo-device. Immediately following the
+ <para>When using the
<literal>log</literal> keyword, the following qualifiers
may be used in this order:</para>
- <para><literal>body</literal> indicates that the first 128
+ <para><literal>body</literal>: indicates that the first 128
bytes of the packet contents will be logged after the
headers.</para>
- <para><literal>first</literal>. If the
+ <para><literal>first</literal>: if the
<literal>log</literal> keyword is being used in
conjunction with a <literal>keep state</literal> option,
this option is recommended so that only the triggering
@@ -1815,20 +1811,36 @@ ipnat_rules="/etc/ipnat.rules" # rules definition file for ipnat</programlist
</varlistentry>
<varlistentry>
- <term>SELECTION</term>
+ <term>PROTO_TYPE</term>
<listitem>
- <para>The keywords described in this section are used to
- describe attributes of the packet to be checked when
- determining whether or not rules match. There is a
- keyword subject, and it has sub-option keywords, one of
- which has to be selected. The following general-purpose
- attributes are provided for matching, and must be used
- in this order:</para>
+ <para>The protocol type is optional. However, it is
+ mandatory if the rule needs to specify a a SRC_PROTO or
+ a DST_PROTO as it defines the type of protocol. When
+ specifying the type of protocol, use the
+ <literal>proto</literal> keyword followed by either a
+ protocol number or name from
+ <filename>/etc/protocols</filename>.
+ Example keywords include <literal>tcp</literal>,
+ <literal>udp</literal>, or
+ <literal>icmp</literal>.</para>
</listitem>
</varlistentry>
<varlistentry>
- <term>PROTO</term>
+ <term>SRC_ADDR</term>
+ <listitem>
+ <para>The <literal>from</literal> keyword is mandatory and
+ is followed by a keyword which represents the source of
+ the packet. The source can be a hostname, an
+ <acronym>IP</acronym> address followed by the
+ <acronym>CIDR</acronym> mask, an address pool, or the
+ keyword <literal>all</literal>. Refer to &man.ipf.5;
+ for examples.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>SRC_PORT</term>
<listitem>
<para><literal>proto</literal> is the subject keyword
which must include one of its corresponding keyword
@@ -1847,7 +1859,7 @@ ipnat_rules="/etc/ipnat.rules" # rules definition file for ipnat</programlist
</varlistentry>
<varlistentry>
- <term>SRC_ADDR/DST_ADDR</term>
+ <term>DST_ADDR</term>
<listitem>
<para>The <literal>all</literal> keyword is equivalent to
<quote>from any to any</quote> with no other match
@@ -1876,7 +1888,7 @@ ipnat_rules="/etc/ipnat.rules" # rules definition file for ipnat</programlist
</varlistentry>
<varlistentry>
- <term>PORT</term>
+ <term>DST_PORT</term>
<listitem>
<para>If a port match is included, for either or both of
source and destination, it is only applied to