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

    LAN routing to VLANS

    Scheduled Pinned Locked Moved Routing and Multi WAN
    29 Posts 4 Posters 1.6k 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
      Malicair
      last edited by

      LAN routing assistance
      I am new to Netgate equipment and PFSense, along with it being a number of years since I’ve done much switch and network configurations. Which leads me to needing a bit of help in the configuration of the new 7100 that I purchased. Currently I’ve got it online with my ISP and have an active connection on the 7100. But now I need to move the rest of my network to the 7100 which includes numerous VLans and then will need to setup a new NordVPN connection for only one VLan.
      Outline of my configuration:

      (Note: I have substituted IP’s and account information)
      7100:
      ixl0: Fiber connection to my ISP using a static IP. IP: 45.45.45.199/28 GW 45.45.45.197
      eth1: LAN IP:192.168.50.1/24

      Internal Switch A:
      This switch is my primary switch that hosts all the VLANS in my network.
      IP: 192.168.50.2
      VLAN 1: 10.10.8.0/24 – WIFI Network for Clients (NON-VPN)
      VLAN 2: 10.10.10.0/24 – WIFI Network for Clients (NON-VPN)
      VLAN 3: 10.10.14.0/24 – WIFI Network for Clients (NON-VPN)
      VLAN 4: 10.20.0.0/24 – This is the only VLAN will be routed over the NordVPN.

      I had a configuration that was allowing the 10.10.x.x networks to access the internet but then I forgot to save the configuration when I started setting up the NordVPN and trashed the config and I can’t seem to get it back running.

      In my previous router (ASUS) I has set a static route for the 10.10.x.x traffic to be directed to the primary switch of: 192.168.50.1. I had done something of this sort to create the connectivity but since blowing up the config I can’t seem to recreate the environment.

      My first question/point is help in getting the 10.10.x.x networks to route correctly again.

      Second would be help in ensuring the NordVPN configuration changes don’t mess with the 10.10.x.x networks and ONLY routes the 10.20.0.x network over the VPN.

      M S M 3 Replies Last reply Reply Quote 0
      • M
        michmoor LAYER 8 Rebel Alliance @Malicair
        last edited by

        @malicair said in LAN routing to VLANS:

        My first question/point is help in getting the 10.10.x.x networks to route correctly again.

        Route to what exactly?

        1. Is your 7100 going to be the default gateway for all of your VLANs?
        2. For policy routing with NordVPN review this video. Its for PIA but the steps are the same. https://www.youtube.com/watch?v=TglViu6ctWE

        Firewall: NetGate,Palo Alto-VM,Juniper SRX
        Routing: Juniper, Arista, Cisco
        Switching: Juniper, Arista, Cisco
        Wireless: Unifi, Aruba IAP
        JNCIP,CCNP Enterprise

        1 Reply Last reply Reply Quote 0
        • S
          SteveITS Galactic Empire @Malicair
          last edited by

          @malicair said in LAN routing to VLANS:

          help in getting the 10.10.x.x networks to route correctly again

          pfSense will handle the routing for its own interfaces, as long as it is the gateway for each. For the VLAN1-3 interfaces you'll need to add firewall rules to allow traffic out, e.g. "VLAN1 Net to any" would allow to the Internet, pfSense, and other VLANs.

          Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
          When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
          Upvote 👍 helpful posts!

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

            @malicair Apparently I need to clarify a bit more on the configuration. The 7100 is functioning as the firewall and primary router to my site. Behind the 7100 is another switch (EX435) that is the Gateway for the internal networks. All internal 10.x.x.x networks are hosted on it. The 10.x.x.x network traffic that is on the EX435 switch is leaving that switch destined for the internet and through the 7100 but is unable to complete a connection. It may be the 7100 is not routing or NAT'ing the traffic out or simply not returning the traffic back.

            Once again, my skills are rusty and I'm a complete "newb" to the PFSense software, so I'll need a bit more help in managing the interfaces and getting the changes applied properly.

            V M 2 Replies Last reply Reply Quote 0
            • V
              viragomann @Malicair
              last edited by

              @malicair
              Why don't you terminate all the VLANs on pfSense?

              In your setup pfSense doesn't know the VLANs, because they are attached to the switch.
              I assume, the switch does not nat the upstream traffic. So you have to add outbound NAT rules on pfSense for them.
              Firewall > NAT > outbound.

              Set it into the hybrid mode first.
              Then add a rule to WAN interface for the source of 10.0.0.0/28, destination any, translation interface address.

              M V 2 Replies Last reply Reply Quote 0
              • M
                michmoor LAYER 8 Rebel Alliance @Malicair
                last edited by

                @malicair said in LAN routing to VLANS:

                It may be the 7100 is not routing or NAT'ing the traffic out or simply not returning the traffic back.

                Thanks for adding more color to your issue.

                1. Do you have an outbound NAT policy on your 7100 to NAT those 10.X networks?
                  2.Do you have a firewall policy that permits traffic from your 10 nets to go out to the internet?
                  3.What do you see in the Status>System Logs>Firewall view on the 7100. Any blocks or passes for your 10 networks
                2. Does the 7100 have a route to the 10.X networks that are located on teh EX435 switch?

                Firewall: NetGate,Palo Alto-VM,Juniper SRX
                Routing: Juniper, Arista, Cisco
                Switching: Juniper, Arista, Cisco
                Wireless: Unifi, Aruba IAP
                JNCIP,CCNP Enterprise

                M 1 Reply Last reply Reply Quote 0
                • M
                  Malicair @michmoor
                  last edited by Malicair

                  @michmoor said in LAN routing to VLANS:

                  Do you have an outbound NAT policy on your 7100 to NAT those 10.X networks?
                  (Malicair: NO, apparently I do need these...)

                  Do you have a firewall policy that permits traffic from your 10 nets to go out to the internet?
                  (Malicair: NO, apparently I do need these...)

                  What do you see in the Status>System Logs>Firewall view on the 7100. Any blocks or passes for your 10 networks
                  (Malicair: Yes I am seeing WAN and LAN blocks on all 10.x traffic.)

                  Does the 7100 have a route to the 10.X networks that are located on teh EX435 switch?
                  (Malicair: Yes, I built a default gateway for the LAN Switch of 192.168.50.2 and assigned a route of: Destination 10.10.0.0/16 to the 192.168.50.2 gateway.)

                  Can you help me out in getting these NAT and policies set?

                  M 1 Reply Last reply Reply Quote 0
                  • M
                    Malicair @viragomann
                    last edited by

                    @viragomann I appreciate that thought. It had briefly crossed my mind but for expansion purposes and I have a ton more familiarity with that equipment and the CLI interface those are way easier for me to manage.

                    1 Reply Last reply Reply Quote 0
                    • M
                      michmoor LAYER 8 Rebel Alliance @Malicair
                      last edited by michmoor

                      @malicair The netgate documentation is really great in getting you set up with creating outbound NAT rules along with Firewall rules.

                      Worse case if this is for your business I would recommend https://www.netgate.com/support?

                      Firewall: NetGate,Palo Alto-VM,Juniper SRX
                      Routing: Juniper, Arista, Cisco
                      Switching: Juniper, Arista, Cisco
                      Wireless: Unifi, Aruba IAP
                      JNCIP,CCNP Enterprise

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

                        @viragomann said in LAN routing to VLANS:

                        Firewall > NAT > outbound.
                        Set it into the hybrid mode first.
                        Then add a rule to WAN interface for the source of 10.0.0.0/28, destination any, translation interface address.

                        Is that really to hard to follow?

                        Again:

                        1. Enable the hybrid mode.
                        2. Add a rule:
                          interface: WAN
                          protocol: any
                          source: network - 10.0.0.0/28
                          destination: any
                          translation: interface address

                        There is no need for multiple rules. This one covers all your VLANs, expect that one that should go out to the VPN.
                        You will need a similar rule for the VNP network, but on the VPN interface. I assume, it is described in the video linked above.

                        A static route is only needed for inbound traffic. As I understand your requirements, this is not desired.
                        And if, you can also do it with a single route using the network I stated in the outbound NAT rule.

                        M 1 Reply Last reply Reply Quote 0
                        • M
                          michmoor LAYER 8 Rebel Alliance @viragomann
                          last edited by

                          @viragomann I think the static will be needed for return traffic when the 10 nets go out to the internet. Assuming he has a routed link between his switch and the 7100.

                          Firewall: NetGate,Palo Alto-VM,Juniper SRX
                          Routing: Juniper, Arista, Cisco
                          Switching: Juniper, Arista, Cisco
                          Wireless: Unifi, Aruba IAP
                          JNCIP,CCNP Enterprise

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

                            @michmoor
                            Ok. I was assuming, that his L3 switch has set the pfSense LAN as default gateway and hence route all upstream traffic to it.
                            As I understood, he had a similar setup with a dumb router before. So the switch setup should already have worked in the past.

                            M M 2 Replies Last reply Reply Quote 0
                            • M
                              michmoor LAYER 8 Rebel Alliance @viragomann
                              last edited by

                              @viragomann OP can chime in on that. I took it as the switch had a default route to the PFsense but the PFsense would need to know where to route to those 10nets on the way back.

                              Firewall: NetGate,Palo Alto-VM,Juniper SRX
                              Routing: Juniper, Arista, Cisco
                              Switching: Juniper, Arista, Cisco
                              Wireless: Unifi, Aruba IAP
                              JNCIP,CCNP Enterprise

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

                                @michmoor
                                Ah yes, you're absolutely right. The route is needed pointing to the switch, of course.

                                1 Reply Last reply Reply Quote 0
                                • M
                                  Malicair @viragomann
                                  last edited by

                                  @viragomann @michmoor
                                  Hey guys, appreciate you both stepping in to help me.
                                  Viragomann, sorry for not catching before the NAT outbound you suggested.

                                  Yes, the EX435 Switch and other equipment behind it worked perfectly before with the ASUS providing the routing between the WAN and the EX435. Yes I am aware I am doing a double NAT. With the network hardware on the 192.168.50.0 network and my clients connecting to one of the VLANS that are 10.x.x.x.

                                  The Asus was a pretty simple setup but it has one fatal flaw in that it's only copper and an electrical spike killed one of those boxes already and luckily I had a spare that I put in it's place. So hence replacing it with this 7100 that has a fiber connection from the DMARC so I can avoid any electrical spikes in the future.

                                  As I had replied to michmoor earlier I created a LAN gateway of 192.168.50.2 and setup a route for destination addresses of 10.10.x.x to that GW. Do I need this? all net traffic that I am doing currently is originating from internal and I don't want random external traffic onto my network obviously.

                                  Virgomann, Did you have a typo when you suggested an outbound rule of 10.0.0.0/28? Wouldn't it be a 10.0.0.0/8 ? I did create that rule but it didn't get me anywhere from a 10x client.

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

                                    @malicair said in LAN routing to VLANS:

                                    Virgomann, Did you have a typo when you suggested an outbound rule of 10.0.0.0/28? Wouldn't it be a 10.0.0.0/8 ? I did create that rule but it didn't get me anywhere from a 10x client.

                                    Yes, it should be 10.10.0.0/28. It's late here...

                                    Yes I am aware I am doing a double NAT.

                                    We were not assuming this.
                                    This would mean, that your switch translates the source IP in upstream packets into 192.168.50.2?

                                    In this case you would neither need the manual outbound NAT rule, nor the static route. Because pfSense would only see 192.168.50.2 and there should be an automatic outbound NAT rule for the LAN subnet anyway.

                                    M 1 Reply Last reply Reply Quote 0
                                    • M
                                      Malicair @viragomann
                                      last edited by

                                      @viragomann
                                      On my EX435 switch I have a static route to 192.168.50.1 which "was" the ASUS router and is now the 7100. So I believe it is simply putting the 10.x traffic directly onto the 7100 which it knows nothing about. (note: I'm stretching my brain here...)

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

                                        @malicair
                                        The route on pfSense for the 10.10.x would not impair the functionality even if it was not needed. Neither the outbound NAT rules did. In this case, pfSense would never get a packet for 10.10.x.

                                        However, you should know if your switch does nat.
                                        If you default route on the switch is pointing to pfSense, packets should get directed to it.
                                        So you could run a packet capture on pfSense LAN while you try to access an internet resource from a VLAN to see, what's going on.

                                        M 1 Reply Last reply Reply Quote 0
                                        • M
                                          Malicair @viragomann
                                          last edited by

                                          @viragomann
                                          The 7100 is seeing 10.x traffic.

                                          Here is the results of a LAN packet capture:
                                          18:28:16.793704 IP 10.10.8.12.29620 > 8.8.4.4.53: UDP, length 32
                                          18:28:17.952164 IP 10.10.10.11.49268 > 8.8.8.8.53: UDP, length 59
                                          18:28:17.952415 IP 10.10.10.11.64554 > 40.97.190.2.443: tcp 31
                                          18:28:17.952794 IP 10.10.10.11.52456 > 8.8.8.8.53: UDP, length 59
                                          18:28:17.952800 IP 10.10.10.11.63862 > 8.8.8.8.53: UDP, length 37
                                          18:28:17.952807 IP 10.10.10.11.58518 > 8.8.8.8.53: UDP, length 37
                                          18:28:20.972454 IP 10.10.10.11.64554 > 40.97.190.2.443: tcp 31

                                          And here is results from the firewall:
                                          Dec 6 18:27:17 LAN Default deny rule IPv4 (1000000103) 10.10.10.11 17.253.5.202 ICMP
                                          Dec 6 18:27:20 LAN Default deny rule IPv4 (1000000103) 10.10.8.11:47105 8.8.4.4:53 UDP

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

                                            @malicair
                                            I see. Obviously pfSense doesn’t pass the packets.
                                            You need a rule on LAN to allow it.
                                            By default pfSense automatically creates a rule only for the LAN subnet. But 10.10.x.x lies outside of this.

                                            Additionally you need the route and outbound NAT rule as mentioned above.

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