DNAT/SNAT syntax
Sylvain GIL
sylvain.gil@solsoft.fr
Tue, 17 Jul 2001 18:20:04 +0200
Hi,
Is there a good reason that leads to not beeing able to use CIDR
addresses representation in the --to part of a NAT rule ?
The following doesn't work:
iptables -t nat -A PREROUTING -s 192.168.0.0/24 -j DNAT --to 195.10.10.0/24
The following works:
iptables -t nat -A PREROUTING -s 192.168.0.0/24 -j DNAT --to \
195.10.10.0-195.10.10.255
It's getting very funny when your are trying to do static NAT rules
since -s doesn't accept 195.10.10.0-195.10.10.255 but only CIDR :)
regards,
--
Sylvain.