Multi WAN IPs to Multi VLAN NAT
solarizde last edited by
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 184.108.40.206 - 220.127.116.11 with 18.104.22.168 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:
22.214.171.124 <-NAT-> 192.168.2.0/24
126.96.36.199 <-NAT-> 192.168.3.0/24
188.8.131.52 <-NAT-> 192.168.4.0/24
184.108.40.206 <-NAT-> 192.168.5.0/24
220.127.116.11 <-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
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: 18.104.22.168
And then repeat that, changing the source network and translation address. You'll need one rule for each pairing.