Community discussions

MikroTik App
 
gonsa
just joined
Topic Author
Posts: 2
Joined: Sun Jun 05, 2005 10:22 pm

please help with NAT

Mon Jun 06, 2005 1:20 am

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
 
User avatar
tneumann
Member
Member
Posts: 394
Joined: Sat Apr 16, 2005 6:38 pm
Location: Germany

Mon Jun 06, 2005 1:34 am

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

Who is online

Users browsing this forum: halit93ak, nibunasah and 55 guests