Subject: Re: NAT, DHCP, and Cable Modems
To: Andrew Brown <atatat@atatdot.net>
From: Randy Beaudreault <maccult@mac.com>
List: netbsd-help
Date: 06/10/2002 16:18:04
>  >Not really, expect maybe resync ipf (ipf -y) each time you get an address.
>>dhclient should have hooks to run user commands on such events.
>
>cat > /etc/dhclient-exit-hooks << EOF
>if [ -n "$new_ip_address" -a "$new_ip_address" != "$old_ip_address" ]; then
>	ipf -y
>fi
>EOF
>
>or thereabouts.

Even easier, just run the sample ipnat and ipf config files from 
/usr/share/examples/ipf with you interface instead of ppp0 and you're 
off and running.  I have a client who I have sharing her cable 
connection to her two PCs via a NetBSD Mac IIcx that's connects via 
DHCP and I only modified ipf.conf and ipnat.conf to use the ethernet 
interface that's connect to the cable modem instead of ppp0 in these 
files.
-- 
Randy

OS X - UNIX for the rest of us
NetBSD - Catch the Power!