Can any one help me?
I need a script loop, that will add NAT entries. #192.168.0.0/24 public pool which i want to use in 1:8 nat with 172.16.0.0/21 private pool.
for example,
/ip pool
add name=snat-pool ranges=172.16.0.0/21
add name=snat-pool-public ranges=192.168.0.0/24
/ip firewall nat
add chain=srcnat src-address=172.16.0.0/29 action=src-nat to-addresses=192.168.0.1
add chain=srcnat src-address=172.16.0.8/29 action=src-nat to-addresses=192.168.0.2
add chain=srcnat src-address=172.16.0.16/29 action=src-nat to-addresses=192.168.0.3
.
.
.
.
and so on.
netmap [creates a static 1:1 mapping of one set of IP addresses to another one. Often used to distribute public IP addresses to hosts on private networks]. how it will help me in 1:8 nat?
address 172.16.0.1 will be natted to 192.168.0.1
address 172.16.0.2 will be natted to 192.168.0.2
address 172.16.0.3 will be natted to 192.168.0.3
…
address 172.16.1.1 will be natted to 192.168.0.1
address 172.16.1.2 will be natted to 192.168.0.2
address 172.16.1.3 will be natted to 192.168.0.3
…
etc