From nobody@FreeBSD.org  Sun Jun 24 09:22:06 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 70555106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 24 Jun 2012 09:22:06 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 5B8438FC08
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 24 Jun 2012 09:22:06 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q5O9M6th074614
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 24 Jun 2012 09:22:06 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id q5O9M6dA074613;
	Sun, 24 Jun 2012 09:22:06 GMT
	(envelope-from nobody)
Message-Id: <201206240922.q5O9M6dA074613@red.freebsd.org>
Date: Sun, 24 Jun 2012 09:22:06 GMT
From: Robert Simmons <rsimmons0@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: ipfilter section of handbook has an error in the ipnat rules example
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         169367
>Category:       docs
>Synopsis:       ipfilter section of handbook has an error in the ipnat rules example
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-doc
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jun 24 09:30:06 UTC 2012
>Closed-Date:    Mon Jun 25 21:16:57 UTC 2012
>Last-Modified:  Mon Jun 25 21:16:57 UTC 2012
>Originator:     Robert Simmons
>Release:        9.0-RELEASE
>Organization:
>Environment:
FreeBSD test 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan  3 07:15:25 UTC 2012     root@obrian.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
Section 31.5.21.1 IPNAT Rules in the Handbook contains the following example rule line for FTP proxy:

map dc0 0.0.0.0/0 -> 0/32 proxy port 21 ftp/tcp

This is wrong, and leads to an error when the rules files is loaded:
syntax error error at "", line 1
>How-To-Repeat:
try to load the following ipnat rule:

map dc0 0.0.0.0/0 -> 0/32 proxy port 21 ftp/tcp
>Fix:
According to the ipfilter docs, this line should read:

map dc0 0/0 -> 0/32 proxy port 21 ftp/tcp

This does not produce an error, and when I run ipnat -l:

# ipnat -l
List of active MAP/Redirect filters:
map em0 0.0.0.0/0 -> 0.0.0.0/32 proxy port ftp ftp/tcp

>Release-Note:
>Audit-Trail:

From: Robert Simmons <rsimmons0@gmail.com>
To: bug-followup@freebsd.org
Cc:  
Subject: Re: docs/169367: ipfilter section of handbook has an error in the
 ipnat rules example
Date: Mon, 25 Jun 2012 16:55:23 -0400

 Please close this bug and disregard.  It turns out that the error was
 a missing newline at the end of the file, not the syntax of it.  When
 I saved it in vi it added the newline and the rules loaded properly.
State-Changed-From-To: open->closed 
State-Changed-By: issyl0 
State-Changed-When: Mon Jun 25 21:06:14 UTC 2012 
State-Changed-Why:  


http://www.freebsd.org/cgi/query-pr.cgi?pr=169367 
>Unformatted:
