Re: Help getting iptables REDIRECT to work

Gian Piero Carrubba <[email protected]>
Newsgroups gmane.linux.debian.devel.firewall
Message-ID <[email protected]>
* [Thu, Oct 21, 2010 at 01:33:13AM +0100] Chris Haynes:
>Although no strictly a 'firewall' question, I expect the experts on
>iptables are on this list.

Not an expert, anyway...

>I have Debian lenny.
>$ uname -r
>2.6.32.21-m64-mb1

It isn't from a Debian package, is it?

>$ sudo iptables -L

This should be:
$ sudo iptables -t nat -L

>Can anyone tell me how to get REDIRECT working, or suggest further
>diagnostics?

Try doing

$ grep REDIRECT /boot/config-$( uname -r )

for checking kernel support, and

$ dpkg -L iptables | grep REDIRECT

for the userspace counterpart.

For reference, here the results on my (sid) box:

gpiero@caimano:~$ grep REDIRECT /boot/config-$( uname -r )
CONFIG_IP_NF_TARGET_REDIRECT=m   <--
CONFIG_BRIDGE_EBT_REDIRECT=m
gpiero@caimano:~$ dpkg -L iptables | grep REDIRECT                                                                             
/lib/xtables/libipt_REDIRECT.so

Ciao,
Gian Piero.
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.