Use non-local gateway through interface specific route - fails
-
My pfSense installation at my ISP requires the default gateway to be outside my subnet. This is an installation for personal use (VPN on the road).
The IP of pfSense is 192.168.200.200/32 and my ISP gateway is 192.168.100.6 (public IP's redacted)
For many years I have 'worked around' this by using 'shellcmd' to run the following script:
route add 192.168.100.6 -interface vtnet0
route add default 192.168.100.6The 'problem' with this setup is that is does not provide a default gateway under system->routing->gateways for IPv4
Instructions for things like wireguard setup ask me to ensure this is setup.I removed my shellcmd, added a default gateway (needing to check the advanced setting 'Use non-local gateway through interface specific route.' and restarted pfsense.
I could no longer connect to the gateway via the Internet (needed console/shell).
When comparing tcpdump upstream between working and non-working setups...
The shellcmd method showed the source IP of ping packets coming from the pfSense IP 192.168.200.200
The 'correct method' showed the source IP of ping packets coming from '0.0.0.0' and thus does not work.Is this a bug or am I missing something?
-
@krbvroc1
Hello.
You can use option SYSTEM - ROUTING - GATEWAYS - clic ADD - clic DISPLAY ADVANCED - check "Use non-local gateway"
Regards.