Define source IP for router traffic generated

EDIT: the text below is not true for src-nat.
The problem is that it is not this simple because RouterOS does not allow to src-nat locally originated packets directly, this picture says it all - there is no

output

chain in the

nat

table. That’s why the loopback tunnel described on the link above is necessary to dst-nat or src-nat locally originated packets before sending them to the wire.

People used to linux ****

netfilter

(aka

iptables

) usually forget about the fact that the functionality is not enabled 1:1 in RouterOS. On the other hand, people spoilt by Mikrotik’s address lists are usually surprised that this functionality doesn’t exist out of the box on many linux distributuions.