Re: Port redirection

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

 



On Tue, May 31, 2005 at 12:25:03PM -0700, Chris NoSurname wrote:
> 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

if resin is not listening on $INBOUND_IF_IP:8900; or more realistically
0.0.0.0:8900, then it wouldn't work.  REDIRECT rewrites the dst IP to be
the IP of the receiving interface, since you don't even have an "-i $IF"
specified in that rule, resin would have to be listening on 0.0.0.0:8900
to even have a shot at working properly (or the machine in question
only has a single interface, perhaps?).

-j

--
"Peter: We love the Bible in this house.
 Francis: Really. What's your favorite book of the Bible?
 Peter: Uhhhhh... the book where Jesus swallows the puzzle piece and
 the man in the yellow hat has to take him to the hospital."
        --Family Guy


[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