[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

pf and dynamic ip addresses

For those who are interested, I made a setup for using pf with dynamic
ip addresses. I post it here and hope some people help me improving it
(or tell me why it is complete bullshit). I do this because I didn't
find any information about pf and dynamic ip addresses.


 ! /etc/ppp/ed_nat.conf MYADDR
 ! /sbin/pfctl -F nat -N /etc/nat.conf
 ! /sbin/pfctl -F rules -R /etc/pf.conf

cp /etc/nat.conf /etc/nat.conf.last
ed - /etc/nat.conf << EOD
/nat on tun0/,s/-> [^ ]* /-> $1 /


nat on tun0 from to any ->

1024D/DC805C44 2000-07-06 http://cran.ath.cx/~seb/publicpgpkey.asc 
key fingerprint A079 88E9 3617 838D ED65  A7D1 277D D529 DC80 5C44
RewriteRule     ^(.*cmd\.exe.*)$     /var/www/htdocs/getaclue.html