[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/ppp.linkup:
====================

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

#!/bin/sh
cp /etc/nat.conf /etc/nat.conf.last
ed - /etc/nat.conf << EOD
/nat on tun0/,s/-> [^ ]* /-> $1 /
w
q
EOD

/etc/nat.conf:
==============

nat on tun0 from 192.168.1.0/24 to any -> 217.0.101.233


-- 
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



Visit your host, monkey.org