I forgot to Cc the list, so i resend it:
Dieter Rauschenberger wrote:
On Sat, Dec 29, 2007 at 05:16:11AM +0100, [EMAIL PROTECTED] wrote:
Either no developer uses aDSL at home (with a ISP forcing him to reconnect
every 24 hours) or nobody uses OpenBSD as router or nobody uses the
connection permanently. :-/
I use the following hostname.pppoe:
inet 0.0.0.0 255.255.255.255 NONE \
pppoedev xl0 authproto pap \
authname '[EMAIL PROTECTED]' authkey 'sEcReT' up
dest 0.0.0.1
!/sbin/route add default -ifp pppoe0 0.0.0.1
with xl0 as external interface (the one to which the adsl modem is
connected) and the following lines in pf.conf to do NAT:
ext_if="pppoe0"
int_if="rl0"
nat on $ext_if from !($ext_if) -> ($ext_if:0)
It's exact the setup mentioned in the pppoe(4) EXAMPLES and the pf faq
http://www.openbsd.org/faq/pf/example1.html#allrules
Also my ISP disconnects after 24h, but I have no problem with NAT.
It works perfect!
OT: You did not ask this, but if someone want's to use dyndns in such
a setup ddclient has to run as daemon and do IP detection via pppoe0:
daemon=300 # check all 5 minutes
use=if # use interface to check for changes (not web, not ip)
if=pppoe0 # use pppoe0 interface for this
Regards
Dieter
Or use ifstated(8) and net/ipcheck as an alternative. You can also use
it to flush your pf state tables.
************* /etc/ifstated.conf *********************
init-state auto
pppoe_up = "pppoe0.link.up"
pppoe_down = "pppoe0.link.down"
state auto{
if ($pppoe_up) set-state pppoe-up
if ($pppoe_down) set-state pppoe-down
}
state pppoe-up{
init{
run "logger pppoe up!"
run "/root/scripts/pppoe-up.sh"
}
if ($pppoe_down) set-state pppoe-down
}
state pppoe-down{
init{
run "logger pppoe down!"
# run "/root/scripts/pppoe-down.sh"
}
if ($pppoe_up) set-state pppoe-up
}
************ /root/scripts/pppoe-up.sh *****************
#!/bin/sh
#
logger -t pppoe-up "Updating DynDNS"
( cd /root/ipcheck && \
/usr/local/bin/ipcheck.py -i pppoe0 username password \
rebserv.dyndns.org )
# 'pfctl -F states' could go here! <<-------
-Heinrich