Best way to route VPN traffic from specified devices?
-
Hi,
We have an OpenVPN client setup in pfSense 2.3.4. I'd like to nominate four devices on LAN to use the OpenVPN connection but leave all other traffic using the regular LAN / WAN routing.
I'd thought of assigning the OpenVPN client to Opt1, hanging a small switch off the back of our VDSL modem and hooking up both Opt1 and WAN to the switch - then setting up a group containing the four IPs which need to use the VPN and telling pfSense to route that group over Opt1 (the VPN).
But I'm only just returning to pfSense after a few years and my head is spinning! :-)
Any suggestions would be much appreciated.
Thanks,
Steve
-
This is a simple policy route.
https://doc.pfsense.org/index.php/What_is_policy_routingMake sure that you do not pull routes from your vpn client you setup on pfsense, or it most likely will set your default route out the vpn. Then the IP of the devices you want to go out your vpn just create a firewall rule saying these IPs (could use aliases to have them all in 1 rule) use the vpn as its gateway.
if these devices need access to other local segments then you would have to put a rule above this routing rule so that they could get access to those networks.