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

    Routing LAN VLAN to to WAN VLAN

    Scheduled Pinned Locked Moved Routing and Multi WAN
    8 Posts 3 Posters 3.4k 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.
    • T
      tc3driver
      last edited by

      I am going to start off with an apology, this could fit into 3 different categories here, Moderators please feel free to move with impunity if this is not the proper place for this post.

      So I have an interesting setup, for those who would ask "Why the hell would you want to do that!?!" The answer is a simple, we are in a transitional period here, and allowing this lan vlan to nat to the default wan vip would be a security risk now, in the future it would still be nice to have different traffic go out of different subnets.

      Here is the current setup:

      WAN:
      VLAN 83

      WLWAN:
      VLAN 81

      LAN:
      VLANS 360 370 371 372 373 374 395

      WLLAN:
      VLAN 384

      Desired routing outcome:
      VLANS 360 370 371 372 373 374 395 route through to WAN vlan 83 via VIP (this currently works!)
      VLAN 384 Route through to WLWAN VLAN 81 via VIP (Not functioning)

      PFSense Version 2.4.1

      Other information:
      Currently using Manual NAT, CARP, and 2 systems for failover.  For testing have stopped CARP currently only using a single system.

      So what we are trying to do is configure this to where anything routing through the firewall from vlan 384 should make it to the internet via vlan 81, what we are actually seeing is the raw requests with the rcf1918 ip addresses hitting local devices beyond the firewall.  I have the NAT rules in place, however they seem to be ignored.  However if I change the nat rules to go to through the WAN interface, it all works fine.  I should also note that the gateway for both VLANs have been added and are pingable.

      Basic rules look like:
      Interface: WLWAN
      Rule: Any traffic from WLLAN to be pushed through to ip (WLWAN VIP).

      There is also the firewall rule for the WLLAN which is allowing anything sourced from the WLLAN through.

      And all the interfaces are configured and functional (the WAN Interfaces are both able to ping google, as an example, from the VIPs).

      I am sure I am missing something simple, and I appreciate any help that can be provided.

      Please feel free to ask any questions, or inquire for further information if there isn't enough provided.

      I am sure you can see where my confusion lies on the part of where to post this.

      1 Reply Last reply Reply Quote 0
      • M
        mikeisfly
        last edited by

        Did you setup a manual outbound Nat rule for your wlwan?

        1 Reply Last reply Reply Quote 0
        • T
          tc3driver
          last edited by

          Yes I did.

          1 Reply Last reply Reply Quote 0
          • M
            mikeisfly
            last edited by

            That should work, can you post your configs?

            1 Reply Last reply Reply Quote 0
            • T
              tc3driver
              last edited by

              Sorry for the delayed response, I was out most of last week.

              Here are some screenshots of the configs.

              InterfaceAssignments.png
              InterfaceAssignments.png_thumb
              NATMode.png
              NATMode.png_thumb
              NATNotWorking.png
              NATNotWorking.png_thumb
              NATWorking.png
              NATWorking.png_thumb
              Vlans.png
              Vlans.png_thumb
              WLLANFWRules.png
              WLLANFWRules.png_thumb
              WLWANFWRules.png
              WLWANFWRules.png_thumb

              1 Reply Last reply Reply Quote 0
              • T
                tc3driver
                last edited by

                It does seem to be working now, though I don't understand why.

                When I changed the oubound nat rule from using the WLWAN to the WAN interface, it started working.  I am not a networking expert by any means of my imagination, this makes no sense to me.  I would assume that the VLAN Tagged interface would be the interface that one should use, not the interface with a different VLAN Tag.  For now this can be marked as solved wtih questions.

                Thanks for all your help and time.

                1 Reply Last reply Reply Quote 0
                • M
                  mikeisfly
                  last edited by

                  I'm glad you got it working. Normally when you want to do policy based routing and you have multiple WANs you would create a rule under that interface setting the gateway to the WAN interface of your choice. Then you have to go to the outbound nat and I usually set it to hybrid mode and I set a rule like something below:

                  Interface    Source            Source Port  Destination  Destination Port    NAT Address    NAT Port      Static Port      Description        Actions

                  WAN        192.168.45.0/24      *              *                    *                    WAN address      *                                      Default GW

                  Order here matters I believe (first match wins) so if your interface rule says to use WLWAN but the NAT outbound rule that matches first says to use the WAN then the traffic would be dropped. Looks like you have your interface rule set to any (*) which is allowing the desired behavior.

                  1 Reply Last reply Reply Quote 0
                  • DerelictD
                    Derelict LAYER 8 Netgate
                    last edited by

                    When I changed the oubound nat rule from using the WLWAN to the WAN interface, it started working.

                    That is because that is how it works. No mystery here. Outbound NAT on the WLWAN interface NATs traffic going out WLWAN, not WAN.

                    Outbound NAT does zero to affect what traffic is routed where. It only defines what translations take place when traffic flows out that interface.

                    Chattanooga, Tennessee, USA
                    A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                    DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                    Do Not Chat For Help! NO_WAN_EGRESS(TM)

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