I want to make NAT from local to public IP 1:1 . But I have two internet gateways and it can happends, packet can go thru IGW1 to internet and packet can return thru IGW2.
I made same IP FIREWALL NAT rules on both IGWs:
Code: Select all
ip firewall nat add chain=srcnat action=netmap to-addresses=185.160.20.177 src-address=10.140.4.2
ip firewall nat add chain=dstnat action=netmap to-addresses=10.140.4.2 dst-address=185.160.20.177
When packet is returning from the internet by the same IGW , where srcnat was done (packet goes to internet by the same IGW), everything works OK:
But when packet is returning from the internet by the second IGW, where srcnat was not done (packet goes to internet by IGW1 but answer come to IGW2), NAT is not working:in:wan out:lan, proto ICMP (type 0, code 0), 178.217.148.41->10.140.4.2, NAT 178.217.148.41->(185.160.20.177->10.140.4.2), len 56
I suppose, there is problem, because there is not established connection in connection tracking table. But I want to make NAT 1:1 and ignore connection tracking table ... not matter, if connection is established or not.in:wan out:wan, proto ICMP (type 0, code 0), 178.217.148.41->185.160.20.177, len 56