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

    Trouble Routing VLAN over OpenVPN Client

    Scheduled Pinned Locked Moved L2/Switching/VLANs
    6 Posts 2 Posters 375 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.
    • B
      bfostyvr
      last edited by

      Hello! I've got a VLAN setup, and I'm trying to block it from private networks and also have it route through a specific OpenVPN Gateway.

      The OpenVPN Client works fine, I've got it set up with other devices on my main LAN, works fine.

      When I try to route the VLAN through it, I lose internet connection to that VLAN.

      The rule I've got setup is as follows:

      Screenshot 2023-10-27 112316.png

      JKnottJ 1 Reply Last reply Reply Quote 0
      • JKnottJ
        JKnott @bfostyvr
        last edited by

        @bfostyvr

        Are you trying to pass the VLAN over the VPN? Or separating the subnet and sending that? If you have subnets, you have to route the VLAN subnets, as you would the main LAN. You'd then recreate the VLAN at the other end.

        PfSense running on Qotom mini PC
        i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
        UniFi AC-Lite access point

        I haven't lost my mind. It's around here...somewhere...

        B 1 Reply Last reply Reply Quote 0
        • B
          bfostyvr @JKnott
          last edited by

          @JKnott Thanks so much for the reply!

          You'll have to excuse me as I'm about as ignorant as it comes to this; still quite green.

          I'm trying to pass the VLAN over the VPN - meaning, from my perspective, that I have created this VLAN, and would like any traffic on the VLAN to pass over the VPN Client (moving it's traffic to another "location").

          ie My main LAN address is 10.27.27.0/24
          My VLAN is 10.27.40.0/24; and I want the LAN traffic over the WAN, and VLAN40 over VPN in, say, Seattle for example.

          JKnottJ 1 Reply Last reply Reply Quote 0
          • JKnottJ
            JKnott @bfostyvr
            last edited by

            @bfostyvr

            You cannot send a VLAN over a VPN. You have to route the subnets, for both the main LAN and VLAN separately. For example, I use VLAN 3 for my guest WiFi. If I wanted the same VLAN at the other end of the VPN, I would have to create the VLAN at the other end and then route the subnet from the VLAN at this end to the VLAN at the other end. This is basic routing.

            PfSense running on Qotom mini PC
            i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
            UniFi AC-Lite access point

            I haven't lost my mind. It's around here...somewhere...

            B 1 Reply Last reply Reply Quote 0
            • B
              bfostyvr @JKnott
              last edited by

              @JKnott Hmm.. My lack of experience makes me ask, if I can define what Gateway the LAN can use, why can't I use the same rule on a VLAN to define what Gateway that uses.

              JKnottJ 1 Reply Last reply Reply Quote 0
              • JKnottJ
                JKnott @bfostyvr
                last edited by

                @bfostyvr

                You have to look at the protocol stack. Ethernet is layer 2 and IP is layer 3. VLANs are often called layer 2.5, as they are applied to an Ethernet interface. VPNs are layer 3. You cannot add layer 2.5 to layer 3.

                Again, you have to route the subnets over the VPN and recreate the VLAN at the other end.

                PfSense running on Qotom mini PC
                i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
                UniFi AC-Lite access point

                I haven't lost my mind. It's around here...somewhere...

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