Re: natd when doubled

From: Stefan Bethke <stb_at_lassitu.de>
Date: Mon, 3 Apr 2006 22:36:44 +0200
Am 03.04.2006 um 14:10 schrieb Randy Bush:

> i am in a hotel which gives me an address from 10/8 on the ether.
> i have it plugged into em0 on a -current system.
>
> i have another machine on wireless out the ath0 port which is
> configured as 192.168.0.1
>
> my natd.conf is
>
>     dynamic yes
>     unregistered_only yes
>     interface em0
>
> my ipfw.rules sez
>
>     add divert natd all from 192.168.0.0/24 to any via em0
>     add divert natd all from any to 192.168.0.0/24 via ath0

natd works on the outbound interface, so "divert natd from any to any  
via em0" should be just the right thing.  Packets originating on em0  
will be left alone by natd, and replies that natd doesn't know how to  
handle will be processed as if natd hadn't been in the loop (modulo - 
deny_incoming).

Also, make sure forwarding is enabled.  As long as packets received  
on ath0 will be routed out on em0, and the return route via ath0 is  
set correctly, it should work.

This would be a standard setup for a cable modem or ADSL with direct  
ethernet (as opposed to PPPoE or PPPoA).


HTH,
Stefan

-- 
Stefan Bethke <stb_at_lassitu.de>   Fon +49 170 346 0140
Received on Mon Apr 03 2006 - 18:37:30 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:54 UTC