Re: Help getting iptables REDIRECT to work

Julien Vehent <[email protected]>
Newsgroups gmane.linux.debian.devel.firewall
Organization linuxwall.info
Message-ID <0b83c2ec7995057742e0f618f3668399@localhost>
On Thu, 21 Oct 2010 11:55:53 +0200, Pascal Hambourg <[email protected]> wrote:
> Hello,
> 
> Julien Vehent a écrit :
>> On Thu, 21 Oct 2010 01:33:13 +0100, Chris Haynes <[email protected]> wrote:
>>> $ sudo iptables -v -A PREROUTING -t nat -p tcp --dport 80 -j REDIRECT
>>> --to-port 8080
>>> REDIRECT tcp opt -- in * out * 0.0.0.0/0 -> 0.0.0.0/0 tcp dpt:80 redir
>>> ports 8080
>>> iptables: No chain/target/match by that name
>>
>> Has the sage would say, RTFM. If you had, you would have noticed that
>> you missed an "s" at --to-ports :p
> 
> If that was the problem, the error message would be different.
> Actually the full option name is not required. An iptables option name
> can be shortened if it does not conflict with another. "--to-ports" can
> be shortened to "--to".

...
You're right, the "--to-port" argument works fine. I should probably go slap myself for being cocky.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.