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

    Multi WAN IPs to Multi VLAN NAT

    Scheduled Pinned Locked Moved NAT
    2 Posts 2 Posters 512 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.
    • S
      solarizde
      last edited by

      Hey,

      I currently face a little Problem with some NAT. I have a WAN Connection with several public IPs needed to be used by several internal VLANs.

      Lets say, my WAN IPs would be 1.0.0.2 - 1.0.0.6 with 1.0.0.1 as my WAN GW. On my LAN I have 5 matching VLAN IDs 2 to 6.

      From VLAN 1: 192.168.2.0/24 to VLAN 5: 192.168.6.0/24

      What I want to achieve is a normal NAT Operation for those isolated VLANs with a WAN Mapping like:

      1.0.0.2 <-NAT-> 192.168.2.0/24
      1.0.0.3 <-NAT-> 192.168.3.0/24
      1.0.0.4 <-NAT-> 192.168.4.0/24
      1.0.0.5 <-NAT-> 192.168.5.0/24
      1.0.0.6 <-NAT-> 192.168.6.0/24

      Currently I tried to add my public WAN IPs as a "IP Alias" to my WAN Interface and created VLANs with matching DHCP Settings. So far so good, but how do I get the mapping done right? 1:1 Mapping as far as I understood only help me to map to a single host not to a whole /24

      Does anybody have some experience with that?

      Thanks in Advance

      1 Reply Last reply Reply Quote 0
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by

        That wouldn't be 1:1, just plain outbound NAT (Firewall > NAT, Outbound tab)

        Switch to hybrid outbound NAT and add rules to do just what you state, for example:

        • Interface: WAN
        • Protocol: Any
        • Source: Network, 192.168.2.0/24
        • Destination: Any
        • Translation Address: 1.0.0.2

        And then repeat that, changing the source network and translation address. You'll need one rule for each pairing.

        Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

        Need help fast? Netgate Global Support!

        Do not Chat/PM for help!

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