Hi guys.
Is it possible to netmap 100.64.0.0/10 to X.X.X.X/23 or /22 in one rule?
Thanks
Hi guys.
Is it possible to netmap 100.64.0.0/10 to X.X.X.X/23 or /22 in one rule?
Thanks
Did you want to write that you have two IP pools, a /22 and a /23
and you want to use them as a source for a CGNAT that uses 100.64.0.0/10 ???
It is more logical than the reverse(²)…
I was wondering if MT can evenyl distribute 100.64.0.0/10 to 1024 addresses so I don’t need to make multiple rules:
Example:
chain=srcnat src-address=100.64.0.0/10 action=netmap to-addresses=192.168.0.0/22
If it can’t I need to write it like:
chain=srcnat src-address=100.64.0.0/24 action=netmap to-addresses=192.168.0.0/24
chain=srcnat src-address=100.64.1.0/24 action=netmap to-addresses=192.168.1.0/24
chain=srcnat src-address=100.64.2.0/24 action=netmap to-addresses=192.168.2.0/24
chain=srcnat src-address=100.64.3.0/24 action=netmap to-addresses=192.168.3.0/24
chain=srcnat src-address=100.64.4.0/24 action=netmap to-addresses=192.168.0.0/24
etc…
I was hoping that MT can do it for me this way ![]()
netmap has a precise meaning - it is a substitution of one prefix by another of the same length and keeping the suffix unchanged. If you want to src-nat (or dst-nat) one range of addresses to another range, you can use a standard src-nat action:
src-address=100.64.0.0/10 action=src-nat to-addresses=192.168.0.0/22
This rule will assign addresses from 192.168.0.0 to 192.168.3.255 as reply-dst addresses, using some distribution rule unknown to me. There is also the same action that should assign always the same reply-dst address to a connection from a given source address.