My line in /etc/network/interfaces is as follows:
post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 7997 -j DNAT --to 10.4.0.3:22
It seems to work fine to forward SSH, and in other similar rules; HTTP and HTTPS traffic as well. When I look at the man pages the directive:
--to
appears to do something completely different to:
--to-destination
which is the directive I would expect. There are 4 mentions of "--to " in the iptables extensions man page. Which one is being used?
Why does it still work? Is it correct usage? If not is it safe to use in this way or should I change it to --to-destination?