Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Single Subnet Traffic through VPN

    Scheduled Pinned Locked Moved General pfSense Questions
    vpn
    2 Posts 2 Posters 421 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      misanthropist
      last edited by

      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?

      1 Reply Last reply Reply Quote 0
      • Z
        Zawi
        last edited by

        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

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.