Hi all,

I am failing at a basic routing.

I have included this rule in my pf.conf:

pass out quick proto udp from any to any port 51820 route-to 192.168.1.254

I thought this would be force egress traffic with destination port 51820 to use 
 192.168.1.254 as a gateway, instead of the default gateway specified in `route 
show`

Is this incorrect?

It seems to not work, as this scenario fail:

SCENARIO FAIL
-----------------------

#pf.conf
pass out quick proto udp from any to any port 51820 route-to 192.168.1.254

# routing
route change default 10.0.0.1 # point all traffic to vpn gateway



whereas this works (everything is the same, but I manually add a route to the 
public ip of the vpn)

SCENARIO WORKS
-----------------------------
#pf.conf
pass out quick proto udp from any to any port 51820 route-to 192.168.1.254

# routing
route change default 10.0.0.1 # point all traffic to vpn gateway

# routing
route add 135.32.101.17 192.168.1.254 # point vpn_public_ip to local gateway



So it seems my understanding of this pf rule is incorrect.

Can anyone help me use pf to override the default gateway?

Thanks!


Reply via email to