Multi WAN IPs to Multi VLAN NAT
-
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/24Currently 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
-
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.