Changing outbound IP address on NAT'd traffic

Hello,

We have an internal network on private addresses 192.168.0.x which we are NAT’ing to the outside world. We would like all undefined traffic to NAT out one IP address, but would also like to force specific private IP addresses to NAT out a different IP.

In version 2.8 we used to do this as follows :

ip firewall src-nat add src-address=192.168.0.1/32 action=nat to-src-address=123.123.123.1 to-src-port=0 disabled=no

However in version 2.9 it will not allow me to specify a dst-nat action on a src-nat rule. The error message I receive is “Couldn’t add New NAT RUle - srcnat chain can not contain redirect/dnat actions (6)”

Try something like:

/ip firewall nat add chain=srcnat src-address=192.168.0.50/32 action=src-nat to-addresses=[public IP] to-ports=0-65535 disabled=no

See if that does what you want.

-=Russ=-

Worked like a charm.