View Single Post
Posts: 10 | Thanked: 2 times | Joined on Jun 2008
#3
Yes, I have. I suppose I should have given the complete command. Also, note that I have tried this on other debian distros with absolutely no problem

The command is
iptables -t nat -A PREROUTING -i %iface -p tcp --dport %port -j REDIRECT --to-ports %rport

The %iface, %port, and %rport are being replace by a script, but as you can see, the tcp is being specified by "-p tcp". For some reason it just doesn't seem to be able to handle or recognize the "--to-ports".

Has anyone found a way to get iptables to recognize the --to-ports variable or have found a fix. Any hints would be greatly appreciated!