Page 1 of 1

please help with NAT

Posted: Mon Jun 06, 2005 1:20 am
by gonsa
please help with scripts to:
example :

ip nat 192.168.0.1 to 192.168.0.7/29 NAT to ip public 222.222.222.221 /32

ip nat 192.168.0.8 to 192.168.0.15/29 NAT to ip public 222.222.222.222 /32


ip nat 192.168.0.8 to 192.168.0.15/29 NAT to ip public 222.222.222.223 /32

Posted: Mon Jun 06, 2005 1:34 am
by tneumann
It's all explained in
http://www.mikrotik.com/docs/ros/2.9/ip/nat

Basically, just do something like
/ip firewall nat
add chain=srcnat out-interface=<your_inet_iface> src-address=192.168.0.0/29 action=masquerade  to-addresses=222.222.222.221
add chain=srcnat out-interface=<your_inet_iface> src-address=192.168.0.8/29 action=masquerade  to-addresses=222.222.222.222
In your question the source address ranges of the last two lines you gave are identical; I don't know how (any why) you'd be able to map the same source addresses to two different external addresses (once .222 and once .223)

--Tom