3 NICs NAT setup, almost there ...

Barney Wolff barney at databus.com
Fri May 23 09:49:09 PDT 2003


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.


More information about the freebsd-questions mailing list