Hello,

I have two internet accesses, and I am using a route-to rule to assign specific traffic to a specified interface (the way I want in the routing table). Various tests have revealed I need to specify the next hop otherwise the "default" route will always be used.

My problem: I have a really bad ISP which, although I have a static IP, 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 am sure some PF wizards already have the solution for me... thanks in advance.

Matthias Bertschy


PS: here are my PF rules...
(If stands for interface)
(Gw stands for gateway)

pass out on $ISP1If route-to ($ISP2If $ISP2Gw) from $ISP2If keep state
pass out on $ISP2If route-to ($ISP1If $ISP1Gw) from $ISP1If keep state


PS2: for those who are really interested in details, this is used to setup two IPSEC tunnels (transport mode) to the same host, making sure they don't use the same connection - using the Local-address rule in isakmpd.conf - and I route traffic through them using gif(4) tunnels.

Reply via email to