Single Subnet Traffic through VPN
-
I have two WiFi routers connected to different NICs on the hardware running pfSense. I am trying to route traffic from only one of those routers through a VPN and I'm not sure what rules need to be set to achieve this.
The VPN connection works and I can setup the firewall to route all traffic from both routers through the VPN connection following this guide: https://support.nordvpn.com/Connectivity/Router/1089079142/pfSense-2-4-4-setup-with-NordVPN.htm. However, when I try to route just the traffic coming from one WiFi router, the forwarding rule doesn't seem to work and everything goes through the default WAN connection.
The VPN-intended router is subnet 192.168.2.0/24. In pfSense, Firewall -> NAT -> Outbound has a rule with 'Interface' configured for the VPN, and 'Source' designated as 'Network, 192.168.2.0/24'. Firewall -> Rules has a rule with 'Interface' set to OPT2 (which the VPN-intended router is plugged into), 'Source' set to 'Network, 192.168.2.0/24', and 'Gateway' set to the VPN. LAN, OPT1, and OPT2 are bridged.
What else do I need to set to get this working correctly?
-
Use policy routing
https://docs.netgate.com/pfsense/en/latest/routing/directing-traffic-with-policy-routing.html
https://docs.netgate.com/pfsense/en/latest/book/multiwan/policy-routing-configuration.html