On Wednesday, 2. May 2007 18:29:54 Matthias Bertschy wrote: > gives me a different gateway each time the pppoe (using ppp(8) on tun0) > is established. > As this IP changes every time, it is very difficult to hardcode it in > pf.conf > So, I have several solutions so far: > 1. change ISP > 2. dynamically edit pf.conf > 3. ??? magic spell ???
I would try number 2. Use tables instead of macros for the gateway IP and add the IP to the table as your ppp line goes up. in ppp.linkup: :ISP1 !bg pfctl -t ISP1Gw -T replace $HISADDR :ISP2 !bg pfctl -t ISP2Gw -T replace $HISADDR in pf.conf: table ISP1Gw persist table ISP2Gw persist pass out on $ISP1If route-to ($ISP2If <ISP2Gw>) from $ISP2If keep state pass out on $ISP2If route-to ($ISP1If <ISP1Gw>) from $ISP1If keep state I have a similar setup and despite a few, propably unrelated, altq problems its running fine.

