Community discussions

MikroTik App
 
routeme
just joined
Topic Author
Posts: 8
Joined: Fri Feb 09, 2007 11:38 pm

Changing outbound IP address on NAT'd traffic

Sat Feb 24, 2007 2:34 am

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)"
 
Syonyk
Member Candidate
Member Candidate
Posts: 109
Joined: Mon Feb 14, 2005 6:32 pm
Location: Coralville, IA
Contact:

Sat Feb 24, 2007 6:59 am

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=-
 
routeme
just joined
Topic Author
Posts: 8
Joined: Fri Feb 09, 2007 11:38 pm

Thanks Syonyk

Wed Mar 14, 2007 9:25 pm

Worked like a charm.

Who is online

Users browsing this forum: Bing [Bot], Znevna and 92 guests