NAT rules to and from
Posted: Sun Apr 30, 2023 4:12 am
So I have a block of 5 public IPs. Let's say 173.160.187.9-13
The MK router is on x.9
Now one mail server is at x.10, then next at x.11
Any traffic to x.10 gets NAT-ed over to 10.0.1.13, and for x.11 to 10.0.1.14. All works great!
But I need traffic coming out to 10.0.1.13 and 10.0.1.14 to exit through their corresponding public IPS (i.e., 172.160.187.10 and x.11)
I thought the following rule would work, but it doesn't:
/ip/firewall/nat
add action=src-nat chain=srcnat src-address=10.0.1.13 to-addresses=173.160.187.10
add action=src-nat chain=srcnat src-address=10.0.1.14 to-addresses=173.160.187.11
All traffic exits through the router address 173.160.187.9
The MK router is on x.9
Now one mail server is at x.10, then next at x.11
Any traffic to x.10 gets NAT-ed over to 10.0.1.13, and for x.11 to 10.0.1.14. All works great!
But I need traffic coming out to 10.0.1.13 and 10.0.1.14 to exit through their corresponding public IPS (i.e., 172.160.187.10 and x.11)
I thought the following rule would work, but it doesn't:
/ip/firewall/nat
add action=src-nat chain=srcnat src-address=10.0.1.13 to-addresses=173.160.187.10
add action=src-nat chain=srcnat src-address=10.0.1.14 to-addresses=173.160.187.11
All traffic exits through the router address 173.160.187.9