Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 01 Apr 2006 21:09:44 -0500
From:      Juergen Heberling <pjah@hicom.net>
To:        freebsd-questions@freebsd.org
Subject:   Re: ipnat syntax error?
Message-ID:  <442F3268.30409@hicom.net>
In-Reply-To: <442F2B69.40503@locolomo.org>
References:  <442EEABE.5000803@hicom.net> <442F2B69.40503@locolomo.org>

next in thread | previous in thread | raw e-mail | index | archive | help


Erik Nørgaard wrote:
> Juergen Heberling wrote:
>> Could someone please check me on this ...
>>
>> fw1# ipnat -CFn -f /etc/ipnat.rules
>> 0 entries flushed from NAT table
>> 1 entries flushed from NAT list
>> syntax error error at "-", line 1
>>
>> /etc/ipnat.rules contains:
>> map  em0 192.168.1.0/24 -> 204.134.75.1-10
>> .. snip ..
>>
>> line 1 in the rules file is the example from the FreeBSD handbook.
>> I'm running FreeBSD6.0 stable.
> 
> It seems to be a documentation bug, the ipf-howto.txt distributed with 
> ipfilter makes no mention of that notation, instead you should use cidr 
> notation, for example
> 
>   204.134.75.0/29
> 
> Erik
> 
> 
Erik,

Thank you for the quick response.
I tried your suggestion of using the cidr notation format and that work; 
thank you!

However I am concerned about overlapping mappings in the cidr range with 
host-to-host maps - my cidr range is a /28, for example,
and I want to map (spoof) some IP address in the middle to, say the web 
or mail servers.  In order to avoid the overlap I was counting on the 
"range" specification on the map command.

TIA for any suggestions.
Juergen



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?442F3268.30409>