SNAT 1 to 1 IP mapping

Sziasztok!

Van egy problémám, miszerint egy Linux host-on n darab belső IP címet n darab külső IP címre kell, hogy NAT-oljak. Tehát pl. a csomag Source IP-ját 192.168.1.101-ről 172.31.1.101-re map-elem, míg a 192.168.1.102-t pl 172.31.1.102-re.

A tipikus SNAT problémára (many to one) sok iptables példát találtam, viszont erre a kérdésre továbbr is keresem a választ (mivel nem nagyon értek az iptables-hez). A segítséget köszönöm!

Hozzászólások

http://linux.die.net/man/8/iptables
NETMAP

This target allows you to statically map a whole network of addresses onto another network of addresses. It can only be used from rules in the nat table.
--to address[/mask]
Network address to map to. The resulting address will be constructed in the following way: All 'one' bits in the mask are filled in from the new 'address'. All bits that are zero in the mask are filled in from the original address