Hi, i need your help.
I broke my brain ![]()
WAN1 - ISP1 (10.0.0.1)
WAN2 - ISP2 (10.0.1.1)
ETH - local network under NAT (192.168.0.0/24)
Both ISP works with different DISTANCE in route list. So, if ISP1 stop working, ISP2 switch automatically.
Each ISP has a independ SMTP server for mail sending and relay denied. I cannot use smtp setting from ISP1 in a ISP2 network.
I was trying to use
ip firewall nat add chain=dstnat protocol=tcp dst-port=25 action=dst-nat to-addresses=smtp.apollo.lv to-ports=25
It work well, but always redirect all smtp traffic to specified address (smtp.apollo.lv)
In my case, i need:
IF traffic goes through ISP1 (or WAN1 interface), redirect all SMTP traffic to specified IP (smtp.apollo.lv)
IF traffic goes through ISP2 (or WAN2 interface), redirect all SMTP traffic to specified IP (smtp.izzi.lv)
Unfortunately, in “chain=dstnat” i can’t use out.interface for determine traffic.
Any good idea, how to make it?