Subject: Re: Routing with NAT
To: Diego Linke - GAMK <linke@calnet.com.br>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: netbsd-help
Date: 09/04/2002 20:57:53
On Wed, Sep 04, 2002 at 08:02:20AM -0300, Diego Linke - GAMK wrote:
> Hi,
>
> ipf not rules (pass all).
>
> ipnat:
>
> map sip0 192.168.0.0/24 -> 222.222.222.222/32
> map sip1 192.168.1.0/24 -> 111.111.111.111/32
>
> This problem is only work fine the network default gateway.
> Example:
>
> route add default 222.222.222.1 (default gateway de 222.222.222.222)
>
> The NAT map sip0 192.168.0.0/24 -> 222.222.222.222/32 works fine, put other not.
>
> Any idea ?
This is quite normal, as all your packets go out of sip0 because of the
default route. So the sip1 nat rule won't ever be hit.
You can try this:
change sip1 to sip0 in ipnat.conf
add this to ipf.conf:
pass in quick on sip0 to sip1 from 111.111.111.111/32 to any
--
Manuel Bouyer <bouyer@antioche.eu.org>
--