OK, here's what I'll do.
In NetBSD 1.5.2, the startup order is:
/etc/rc.d/network
/etc/rc.d/ipfilter
/etc/rc.d/dhclient.
So my initial rules loaded by ipfilter are basic.
Just need to allow inside traffic out
so that we can get a DHCP lease.
# /etc/ipf.conf
block in quick on ne1 all
pass out quick on ne1 from any to any keep state
I create a second ruleset /etc/ipf2.conf which has the
mnemonic "myip" everywhere I want my actual ip address.
Then use the hooks in dhclient to run my script
/usr/local/sbin/ipf.final which will load my final rule set.
#!/bin/sh
# /usr/local/sbin/ipf.final
# Load my ip address into $ip
# Use sed to put it into my filter file
# and pipe the output into ipf.
ip=` ifconfig ne1 | grep inet | awk '{print $2}' `
cat /etc/ipf2.conf | sed "s/myip/$ip/" | ipf -Fa -f -
Well, whatdayathink?
- roger