Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 May 2003 12:49:02 -0400
From:      Barney Wolff <barney@databus.com>
To:        "Paiva, Gilson de" <g-paiva@el.com.br>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: 3 NICs NAT setup, almost there ...
Message-ID:  <20030523164902.GA36660@pit.databus.com>
In-Reply-To: <1091.192.168.1.39.1053704739.squirrel@intranet.el.com.br>
References:  <1091.192.168.1.39.1053704739.squirrel@intranet.el.com.br>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, May 23, 2003 at 12:45:39PM -0300, Paiva, Gilson de wrote:
> Hi,
> 
> Take this scenario:
> 
> 
>         xxx/26               yyy/26
> internet --- ep0 freebsd rl0 --- wired clients
>                    ep1
>                     | private ip ( 192.168.1.0/24 )
>                     |
>                 wireless
> 
> I have to nat packets with destination to an ip xxx/26 to an ip at private
> ip net. So far so good with "common" redirect_address nat configuration.
> The problem happens with traffic between net yyy/26 and the private
> network ( and vice-versa ) because packets get routed to destination
> before they get translated by natd.
> What´s the secret ? I tried everything I known and learned from reading
> but no setup could work out.

I'd use ipfw and natd, and run two instances of natd listening on different
divert sockets.  Rules in ipfw can divert the packets to the right natd
depending on where the packets are coming from or going to.

-- 
Barney Wolff         http://www.databus.com/bwresume.pdf
I'm available by contract or FT, in the NYC metro area or via the 'Net.


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