From owner-svn-doc-all@FreeBSD.ORG Fri Feb 21 20:28:02 2014 Return-Path: Delivered-To: svn-doc-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5C9BFC65; Fri, 21 Feb 2014 20:28:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 47A121908; Fri, 21 Feb 2014 20:28:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1LKS2n8043688; Fri, 21 Feb 2014 20:28:02 GMT (envelope-from dru@svn.freebsd.org) Received: (from dru@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1LKS2mO043687; Fri, 21 Feb 2014 20:28:02 GMT (envelope-from dru@svn.freebsd.org) Message-Id: <201402212028.s1LKS2mO043687@svn.freebsd.org> From: Dru Lavigne Date: Fri, 21 Feb 2014 20:28:02 +0000 (UTC) To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r44019 - head/en_US.ISO8859-1/books/handbook/firewalls X-SVN-Group: doc-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-doc-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire doc trees \(except for " user" , " projects" , and " translations" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Feb 2014 20:28:02 -0000 Author: dru Date: Fri Feb 21 20:28:01 2014 New Revision: 44019 URL: http://svnweb.freebsd.org/changeset/doc/44019 Log: Modernize the next bit of syntax. More to come. Sponsored by: iXsystems Modified: head/en_US.ISO8859-1/books/handbook/firewalls/chapter.xml 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_BLOCKIPFILTER, options IPFILTER_LOG enables IPF logging using the - ipl packet logging pseudo device for + ipl packet logging pseudo-device for every rule that has the log keyword, IPFILTER_LOOKUP enables IP pools in order to speed up @@ -1711,8 +1711,8 @@ ipnat_rules="/etc/ipnat.rules" # rule - ACTION IN-OUT OPTIONS SELECTION STATEFUL - PROTO SRC_ADDR,DST_ADDR OBJECT PORT_NUM TCP_FLAG + ACTION DIRECTION OPTIONS proto PROTO_TYPE + from SRC_ADDR SRC_PORT to DST_ADDR DST_PORT OBJECT PORT_NUM TCP_FLAG STATEFUL This section describes each keyword and its options. @@ -1749,7 +1749,7 @@ ipnat_rules="/etc/ipnat.rules" # rule - IN-OUT + DIRECTION Next, each rule must explicitly state the direction of traffic using one of @@ -1773,39 +1773,35 @@ ipnat_rules="/etc/ipnat.rules" # rule OPTIONS - - These options must be used in the order shown + Options are optional. However, if multiple options + are specified, they must be used in the order shown here. - - log indicates that the packet - header will be written to the &man.ipl.4; packet log - pseudo-device if the selection parameters match the - packet. - - quick indicates that if the - selection parameters match the packet, this rule will be - the last rule checked, and no further processing of any + log: when performing the + specified ACTION, the contents of the packet's + headers will be written to the &man.ipl.4; packet log + pseudo-device. + + quick: 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. - on 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 + on: 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. - When a packet is logged, the headers of the packet - are written to the &man.ipl.4; packet logging - pseudo-device. Immediately following the + When using the log keyword, the following qualifiers may be used in this order: - body indicates that the first 128 + body: indicates that the first 128 bytes of the packet contents will be logged after the headers. - first. If the + first: if the log keyword is being used in conjunction with a keep state option, this option is recommended so that only the triggering @@ -1815,20 +1811,36 @@ ipnat_rules="/etc/ipnat.rules" # rule - SELECTION + PROTO_TYPE - 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: + 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 + proto keyword followed by either a + protocol number or name from + /etc/protocols. + Example keywords include tcp, + udp, or + icmp. - PROTO + SRC_ADDR + + The from keyword is mandatory and + is followed by a keyword which represents the source of + the packet. The source can be a hostname, an + IP address followed by the + CIDR mask, an address pool, or the + keyword all. Refer to &man.ipf.5; + for examples. + + + + + SRC_PORT proto is the subject keyword which must include one of its corresponding keyword @@ -1847,7 +1859,7 @@ ipnat_rules="/etc/ipnat.rules" # rule - SRC_ADDR/DST_ADDR + DST_ADDR The all keyword is equivalent to from any to any with no other match @@ -1876,7 +1888,7 @@ ipnat_rules="/etc/ipnat.rules" # rule - PORT + DST_PORT If a port match is included, for either or both of source and destination, it is only applied to