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

    OpenVPN for VLAN

    Scheduled Pinned Locked Moved OpenVPN
    3 Posts 3 Posters 2.1k 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.
    • V
      vc6SfV8
      last edited by

      I setup an OpenVPN client connection in pfSense, and all traffic seems to route through it.  Is there any way to route only traffic that is on a particular LAN subnet or VLAN over the Open VPN client and let all other traffic flow normally?

      Ryan

      1 Reply Last reply Reply Quote 0
      • V
        viragomann
        last edited by

        pfSense is a router, you can route any source subnet and any destination subnet independently.

        Go to the OpenVPN client settings and uncheck "Don't pull routes".
        Then edit the firewall rules which are allowing the upstream traffic of the desired interface, display the advanced options, go down to gateway and select the gateway which is assinged to the OpenVPN client.

        1 Reply Last reply Reply Quote 0
        • johnpozJ
          johnpoz LAYER 8 Global Moderator
          last edited by

          Yes its called policy based routing.. Your going to want to make sure you don't pull routes from vpn client connection on pfsense.  And then just create firewall rules to send what traffic or devices you want to send down the pfsense client vpn connection.

          An intelligent man is sometimes forced to be drunk to spend time with his fools
          If you get confused: Listen to the Music Play
          Please don't Chat/PM me for help, unless mod related
          SG-4860 24.11 | Lab VMs 2.8, 24.11

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