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

    VLAN over TAP tunnel OpenVPN?

    Scheduled Pinned Locked Moved L2/Switching/VLANs
    11 Posts 4 Posters 3.9k 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.
    • JKnottJ
      JKnott @ncat
      last edited by

      @ncat

      My understanding is OpenVPN doesn't support VLANs. However, I have no experience with that.

      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 0
      • PippinP
        Pippin
        last edited by

        Minimum OpenVPN version 2.5 is required.
        Take a look at

        --vlan-tagging
        

        In manual 2.5:
        https://build.openvpn.net/man/openvpn-2.5/openvpn.8.html

        I gloomily came to the ironic conclusion that if you take a highly intelligent person and give them the best possible, elite education, then you will most likely wind up with an academic who is completely impervious to reality.
        Halton Arp

        N 1 Reply Last reply Reply Quote 1
        • N
          ncat @Pippin
          last edited by

          @pippin Thanks, looks like I have to wait for pfSense 2.5 official release.

          M 1 Reply Last reply Reply Quote 0
          • M
            marvosa @ncat
            last edited by

            Just curious... what problem are you trying to address with this setup?

            N 1 Reply Last reply Reply Quote 0
            • N
              ncat @marvosa
              last edited by ncat

              @marvosa
              I want to setup a separate SSID which will allow me to connect to another location directly, use its DHCP, DNS and etc.
              Imagine, in my Yellow location I have "RED" SSID with 1002 vlan. When I connect to it, all frames go to the pfSense in Red location and are processed according to the Red location rules.
              Not sure if it is possible and what the performance would be with L2 tunnel.
              Another option would be picking up 1002 vlan in yellow location and redirecting all traffic to the red, but that would be layer 3 filtering as far as I understood.

              M 1 Reply Last reply Reply Quote 0
              • M
                marvosa @ncat
                last edited by marvosa

                @ncat
                I understand what you want to do, but the solution you're suggesting will add unnecessary complexity.

                If you want certain devices in the yellow location to use the rules from the red location, then just route the traffic over there.

                What I would do:

                • Re-configure your bridged tunnel into a routed tunnel
                • Create a separate VLAN for the devices you want using rules from the remote location
                • Create a separate SSID and tag the VLAN you just created
                • Policy route traffic sourced from this VLAN over the tunnel to the remote end
                • If you want these devices using DNS from the remote end, just have the local DHCP server for this subnet assign DNS servers from the remote end

                This would be a cleaner setup IMO. Also, the routed tunnel will give you better performance over a bridged solution.

                N 1 Reply Last reply Reply Quote 1
                • N
                  ncat @marvosa
                  last edited by

                  @marvosa thanks for the suggestion. Already tried implementing that.
                  The only issue I got is DHCP. Is it possible to use DHCP of Red location with this solution? That's why I decided to try L2 tunnel.

                  M 1 Reply Last reply Reply Quote 0
                  • M
                    marvosa @ncat
                    last edited by

                    @marvosa thanks for the suggestion. Already tried implementing that.

                    The only issue I got is DHCP. Is it possible to use DHCP of Red location with this solution? That's why I decided to try L2 tunnel.

                    This sort of builds no my previous question... What issue are you trying to address by using a DHCP server that's across a VPN tunnel? I mean, if you're using Cisco switches you could just add an ip-helper-address to send the requests anywhere you want, but it'd be interesting to hear why you're looking to do that instead of leveraging a local DHCP server.

                    N 1 Reply Last reply Reply Quote 0
                    • N
                      ncat @marvosa
                      last edited by

                      @marvosa
                      reg DHCP: some routing rules based on IPs and subnetworks currently exist. So, placing a known MAC device within existing DHCP pool range gives some convenience.

                      M 1 Reply Last reply Reply Quote 0
                      • M
                        marvosa @ncat
                        last edited by marvosa

                        @ncat
                        I understand the convenience factor, however, instead of adding complexity, you could also address those issues by adding the appropriate routes as needed.

                        I have yet to hear anything that couldn't be addressed with a routed solution.

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