Bug 169367

Summary: ipfilter section of handbook has an error in the ipnat rules example
Product: Documentation Reporter: rsimmons0
Component: Books & ArticlesAssignee: freebsd-doc (Nobody) <doc>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description rsimmons0 2012-06-24 10:30:06 UTC
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

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
How-To-Repeat: try to load the following ipnat rule:

map dc0 0.0.0.0/0 -> 0/32 proxy port 21 ftp/tcp
Comment 1 rsimmons0 2012-06-25 21:55:23 UTC
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.
Comment 2 Isabell Long freebsd_committer freebsd_triage 2012-06-25 22:06:14 UTC
State Changed
From-To: open->closed