Re: Help getting iptables REDIRECT to work
Thanks for all the responses to the plea for help below.
It turned out the kernel module which implements REDIRECT had not been flagged for compilation in the distro. I had been given.
For the record, in case anyone else has the same problems again, to fix it:
# CONFIG_IP_NF_TARGET_REDIRECT is not set
Now modprobe can be used to add the module to the kernel.
On Thursday, October 21, 2010 at 1:33:13 AM, Chris Haynes wrote:
> Although no strictly a 'firewall' question, I expect the experts on
> iptables are on this list.
> I'm trying to get the following iptables command to work (response shown
> on lines 2 & 3):
> $ 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