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

    VLAN over VPN

    Scheduled Pinned Locked Moved L2/Switching/VLANs
    15 Posts 3 Posters 1.5k 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.
    • J
      juniper @JKnott
      last edited by

      @jknott said in VLAN over VPN:

      @juniper

      Since the VLAN would have it's own subnet, just route it over the VPN to a VLAN at the other end. Basic routing. It doesn't even have to be the same VLAN ID.

      Ok, i need to propagate public subnet i have on first pfsense on vpn connected pfsense box... Do you mean i have to divide public subnet?

      V JKnottJ 2 Replies Last reply Reply Quote 0
      • V
        viragomann @juniper
        last edited by

        @juniper
        I'm wondering, what the VLAN has to do with a public subnent. Maybe we're missing things.
        Can you describe more details, possibly with a drawing, what you want to achieve?

        J 1 Reply Last reply Reply Quote 0
        • J
          juniper @viragomann
          last edited by juniper

          @viragomann said in VLAN over VPN:

          @juniper
          I'm wondering, what the VLAN has to do with a public subnent. Maybe we're missing things.
          Can you describe more details, possibly with a drawing, what you want to achieve?

          Yes... in that network there is a VLAN for public subnet and i need to share with other site with a VPN (if is it possibile);

          for example 8x.xx.xx.128/25 in first pfsense box and i need some addresses of 8x.xx.xx.128/25 on second remote pfsense box vpn connected...

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

            @juniper
            So simply forward the concerned IPs (NAT).
            That's possible, but it needs some rules to obey.

            J JKnottJ 2 Replies Last reply Reply Quote 0
            • J
              juniper @viragomann
              last edited by juniper

              @viragomann said in VLAN over VPN:

              @juniper
              So simply forward the concerned IPs (NAT).
              That's possible, but it needs some rules to obey.

              Yes but i Need to assign public ip directly on some server....

              JKnottJ V 2 Replies Last reply Reply Quote 0
              • JKnottJ
                JKnott @juniper
                last edited by

                @juniper

                You can have as many subnets as you want routed over the same VPN. It doesn't matter what they do. Routing is routing is routing. I assume you already have your main LAN routed over the VPN. The VLANs are handled in the same way.

                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
                • JKnottJ
                  JKnott @viragomann
                  last edited by

                  @viragomann said in VLAN over VPN:

                  So simply forward the concerned IPs (NAT).

                  He doesn't need NAT. If he has a subnet on the VLAN then it can be routed to another VLAN at the other end. Talking about NAT only adds to the confusion.

                  One thing to bear in mind is that a VPN is simply another IP connection and can be used like any other IP connection.

                  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
                  • JKnottJ
                    JKnott @juniper
                    last edited by

                    @juniper said in VLAN over VPN:

                    Yes but i Need to assign public ip directly on some server....

                    If you're using NAT for that, then it would be handled like any other. The only difference is it has to be routed from one system to the other.

                    Go back to understanding how IP works on a LAN. The destination IP address is examined to see if it belongs on the directly connected subnet. If it does, then the MAC address of the destination is determined and the packet sent out across the LAN. If it's for another subnet, then routing is used to send it to the destination subnet, in this case through the VPN.

                    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...

                    J 1 Reply Last reply Reply Quote 0
                    • J
                      juniper @JKnott
                      last edited by

                      @jknott said in VLAN over VPN:

                      @juniper said in VLAN over VPN:

                      Yes but i Need to assign public ip directly on some server....

                      If you're using NAT for that, then it would be handled like any other. The only difference is it has to be routed from one system to the other.

                      Go back to understanding how IP works on a LAN. The destination IP address is examined to see if it belongs on the directly connected subnet. If it does, then the MAC address of the destination is determined and the packet sent out across the LAN. If it's for another subnet, then routing is used to send it to the destination subnet, in this case through the VPN.

                      Ok, i don't want to use NAT...

                      i need to use addresses of the same subnet (for example 8x.xx.xx.128/25) on both pfsense box linked by a VPN, is there a way to do?

                      V JKnottJ 2 Replies Last reply Reply Quote 0
                      • V
                        viragomann @juniper
                        last edited by

                        @juniper said in VLAN over VPN:

                        Yes but i Need to assign public ip directly on some server....

                        Any plausible reason for that?

                        Possibly it's doable, but make thing very complicated.

                        J 1 Reply Last reply Reply Quote 0
                        • J
                          juniper @viragomann
                          last edited by

                          @viragomann said in VLAN over VPN:

                          @juniper said in VLAN over VPN:

                          Yes but i Need to assign public ip directly on some server....

                          Any plausible reason for that?

                          Possibly it's doable, but make thing very complicated.

                          I need for using with NDI and some camera

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

                            @juniper said in VLAN over VPN:

                            I need for using with NDI and some camera

                            Don't know that.

                            @juniper said in VLAN over VPN:

                            i need to use addresses of the same subnet (for example 8x.xx.xx.128/25) on both pfsense box linked by a VPN, is there a way to do?

                            No, you can route over a whole subnet, which is routed to your IP before though, even with public IPs, but you cannot pick some IPs out of it.

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

                              @juniper said in VLAN over VPN:

                              i need to use addresses of the same subnet (for example 8x.xx.xx.128/25) on both pfsense box linked by a VPN, is there a way to do?

                              You'd need a TAP VPN, not TUN.

                              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
                              • First post
                                Last post
                              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.