I´m running CAPSMAN based forwarding wifi with one single /16 subnet for the wifi clients (VLAN 1000). The clients get SRCNATed to 2 public IP addresses. There´s no problem with that setup.
Now I wanted to add 2 more public IP addresses which fails. Routing to those 4 public IP addresses works without any problems. NAT doesn´t work at all.
dst-address=0.0.0.0/0
gateway=19.1.108.1,19.1.108.5,19.1.108.9,19.1.108.13
gateway-status=
19.1.108.1 reachable via vlan2081,
19.1.108.5 reachable via vlan2082,
19.1.108.9 reachable via vlan2083,
19.1.108.13 reachable via vlan2084,
distance=110 scope=20 target-scope=10 route-tag=1 ospf-metric=11 ospf-type=external-type-2
SRCNAT works with the frist two NAT rules. For the 3rd and 4th rule the counters stay at “0”. The client itself gets the IP address from the 3rd or 4th range, it can ping the gateway 10.40.0.240. That´s all. No NAT afterwards.
Do I miss something? Shouldn´t SRCNAt work like this with multiple WAN IP addresses? Any hints would be great.
If static (coming in on one WAN interface)
add action=src-nat chain=srcnat out-interface=wanISP-ethx to-addresses:wan1IP
add action=src-nat chain=srcnat out-interface=wanISP-ethx to-addresses:wan2IP
add action=src-nat chain=srcnat out-interface=wanISP-ethx to-addresses:wan3IP
add action=src-nat chain=srcnat out-interface=wanISP-ethx to-addresses:wan4IP
Keep in mind this simply denotes which public IP will replace the private IP.
Remember this doesn’t route them to the right outgoing WANIP address it simply instructs the routers in this case, which LANS, VLANS private IPs, should be translated by which public IP.
I suppose if the routing for your config already sends specific LAN traffic to specific WANIPs, the static rules above should work.
I do not know what advantage would be gained by specifying source address in the source nat rules, and hoping someone can point that out??