On Wed, 26 Jul 2006 17:31:22 +0200, Vincent van Beveren wrote:
> Hi everyone,
>
> As far as I understand IP tables, when I setup a TCP/IP connection from
> a local application its filtered though the OUTPUT nat table. Therefor I
> have devised the following rule:
>
> iptables -t nat -A OUTPUT -d 192.168.1.3 -p tcp --dport 80 -j REDIRECT
> --to-port 8081
>
> Which it accepts. Note though that 192.168.1.3 is owned by the local
> host. The PC has multiple IP addresses.
I just tested and it works fine for me.
> However, when I telnet to port 80, it doesn't accept it. If I telnet to
> port 8081, it does. Why doesn't this work? I have made the same rule in
> the PREROUTING table for connections from the outside and that works
> without glitches.
Do you have any other rules in there? (show a iptables -t nat -L OUTPUT)
Regards,
Mark.
|