Choose gateway depending of destination ip/url
-
I've setup my VPN using these instructions and it's working great.
https://protonvpn.com/support/pfsense-openvpn/I couldn't watch iplayer or dazn on my tv so I made an alias for my tv's IP and created a firewall rule. The rule's source is set to the TV's alias and the gateway set to my WAN gateway. Hey-presto, everything from the tv goes through WAN (so I can watch iplayer and dazn) and every other device in my home goes through the VPN.
The only time I don't want to use the VPN on my computer is when I'm playing a particular online computer game. I've been testing how I can do this per destination instead of source by trying to make any traffic that goes to whatismyip.com, or the IP that shows up when I ping it, to go through the WAN gateway instead of the VPN gateway. It never works. It always continues to go through the VPN.
Is what I'm attempting possible? I certainly seem to be able to block 'whatismyip.com' using that destination field but I can't get it to use the WAN gateway insted of the VPN gateway.
Thanks for any help
-
@senselessnewb
Using IP or an alias as the destination of a policy routing rule works in the same way basically.Remember to put the policy routing rule to the top of the rule set, so that it is applied before the subnet rule is probed.
Also consider to flush existing states.
-
Thank you - I still can't get it to work but at least I know it's possible now! I wasn't sure if I was 'floggin' a dead horse!'
The only bit I'm not 100% on is 'flush existing states'... does refreshing/restarting openVPN do this?
Thanks
-
@senselessnewb
Diagnostics > States > States
You can filter the list for a specific IP (TV) and flush only these.