[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: natd with dynamic IP address
- To: misc_(_at_)_openbsd_(_dot_)_org
- Subject: Re: natd with dynamic IP address
- From: "Peter Strömberg" <peters_(_at_)_telia_(_dot_)_net>
- Date: Tue, 11 Jan 2000 09:59:41 +0100
- Cc: Mark Reardon <mcr_(_at_)_gofree_(_dot_)_indigo_(_dot_)_ie>
- Organization: Telia Network, Router Networks / Internet
Den 11 Jan 00, klockan 7:37
skrev Mark Reardon om (natd with dynamic IP address):
> Hi,
>
> I have installed userland PPP and have this auto dialing the net
> happily.
> My next question is how do I set up natd to work with a dynamic IP
> address?
> ...
> map ppp0 192.168.1.0/24 -> ppp0/32 portmap tcp/udp 10000:20000
> map ppp0 192.168.1.0/24 -> ppp0/32
> ...
ipnat expands ppp0/tun0 to the ip-address ppp0/tun0 has AT THE TIME when you run ipnat,
so you have to run ipnat AFTER you have gotten your dynamic-IP.
Try this config, which works for me.
/etc/rc.conf
ipnat=NO
WIth ppp (tun0)
/etc/ppp/ppp.linkup
MYADDR:
shell ipnat -CF -f /etc/ipnat.rules
/etc/ppp/ppp.linkdown (tun0)
MYADDR:
shell ipnat -CF
Or, with pppd (ppp0)
/etc/ppp/ip-up (do a chmod +x)
#!/bin/sh
ipnat -CF -f /etc/ipnat.rules
/etc/ppp/ip-down (do a chmod +x)
#!/bin/sh
ipnat -CF
/Peter
Visit your host, monkey.org