RE: Port redirection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey Chris:

My rule I use for transparent proxy is this:

iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 80 -j REDIRECT
--to-port 3128 

I notice you have set "--to-ports" (ie plural). I'm not sure if that will
work. Some others could comment better than I.

Thanks

Anthony

-----Original Message-----
From: netfilter-bounces@xxxxxxxxxxxxxxxxxxx
[mailto:netfilter-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Chris NoSurname
Sent: Wednesday, 1 June 2005 5:25 AM
To: netfilter@xxxxxxxxxxxxxxxxxxx
Subject: Port redirection

Hi all.

I've searched and searched and I cannot seem to get this working.

I'm trying to redirect port 80 to a different port so that I can run the
Resin application server as non-root user.  I've got the following command..

iptables -t nat -A PREROUTING -p tcp --dport 80 -d x.x.x.x -j REDIRECT
--to-ports 8900

It comes up as 

    0     0 REDIRECT   tcp  --  any    any    
anywhere             www.mydomain.com   tcp dpt:http
redir ports 8900

Yet, if I connect to the http port it is closed.  Port 8900 is open and does
accept connections if I specify it in the address.

I am unclear of why the rules shows up in status, but does not work.

Thanks for any help you can offer.

David

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com 




[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux