I have a setup where I use NAT with masquerade that redirect different Public IP to my internal Private IP. Working fine but when a trace route from a internal server, they all go out using the same Public IP (the first IP that was assign to my WAN interface).
Is there a way to control this outgoing IP using firewall rule. For example I would like to use a dedicated Public IP for all outgoing SMTP for my outgoing mail which I would associate a diffrent PTR record.
I also tought that I would be able to control this default Public IP from my internal traffic going out using the pref source in the my default route. Doesn’t seem to work. Can someone explain me this pref. source setting in route??
Yes, of course. Don’t use an action of “masquerade” but us “src-nat” with a to-address. http://forum.mikrotik.com/t/forwarding-public-ip-to-specific-nated-private-ips/48228/1
That shows different NAT actions by IP. You can make decisions based on many more things, such as protocol and port. See the IP firewall NAT manual for all the available properties.