svn commit: r44019 - head/en_US.ISO8859-1/books/handbook/firewalls

Dru Lavigne dru at
Fri Feb 21 20:28:02 UTC 2014

Author: dru
Date: Fri Feb 21 20:28:01 2014
New Revision: 44019

  Modernize the next bit of syntax. More to come.
  Sponsored by: iXsystems


Modified: head/en_US.ISO8859-1/books/handbook/firewalls/chapter.xml
--- head/en_US.ISO8859-1/books/handbook/firewalls/chapter.xml	Fri Feb 21 18:39:20 2014	(r44018)
+++ head/en_US.ISO8859-1/books/handbook/firewalls/chapter.xml	Fri Feb 21 20:28:01 2014	(r44019)
@@ -1622,7 +1622,7 @@ options IPFILTER_DEFAULT_BLOCK</programl
 	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"    # rule
       <!-- This section is probably wrong. See the OpenBSD flag -->
       <!-- What is the "OpenBSD flag"?  Reference please -->
+      <para><replaceable>ACTION DIRECTION OPTIONS proto PROTO_TYPE
       <para>This section describes each keyword and its options.</para>
@@ -1749,7 +1749,7 @@ ipnat_rules="/etc/ipnat.rules"    # rule
-	  <term>IN-OUT</term>
+	  <term>DIRECTION</term>
 	    <para>Next, each rule must
 	      explicitly state the direction of traffic using one of
@@ -1773,39 +1773,35 @@ ipnat_rules="/etc/ipnat.rules"    # rule
-	    <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
-	    </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>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>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>: 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
-	    <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
-	    <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"    # rule
-	  <term>SELECTION</term>
+	  <term>PROTO_TYPE</term>
-	    <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>
-	  <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>
 	    <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"    # rule
-	  <term>SRC_ADDR/DST_ADDR</term>
+	  <term>DST_ADDR</term>
 	    <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"    # rule
-	  <term>PORT</term>
+	  <term>DST_PORT</term>
 	    <para>If a port match is included, for either or both of
 	      source and destination, it is only applied to

More information about the svn-doc-all mailing list