port forwarding on loopback device
Hi,
I want to forward a port bellow 1024 (let's say 889) to port above
1024 (8080),
all this on loopback device. Is that possible ? I've tried :
sudo iptables -t nat -A PREROUTING -p tcp --dport 889 -i lo -j
REDIRECT --to-port 8080
On 808 I've got a tomcat running, than I've tried to telnet to
127.0.0.1 on 889
an I get
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused
What am I doing wrong ?
Re: port forwarding on loopback device
On Wed, 06 Jun 2007 08:23:32 +0000, thomas.fazekas wrote:
[color=blue]
> Hi,
>
> I want to forward a port bellow 1024 (let's say 889) to port above
> 1024 (8080),
> all this on loopback device. Is that possible ? I've tried :
>
> sudo iptables -t nat -A PREROUTING -p tcp --dport 889 -i lo -j
> REDIRECT --to-port 8080
>
> On 808 I've got a tomcat running, than I've tried to telnet to
> 127.0.0.1 on 889
> an I get
> Trying 127.0.0.1...
> telnet: Unable to connect to remote host: Connection refused
>
> What am I doing wrong ?[/color]
[url]http://iptables.rlworkman.net/chunkyhtml/x4529.html[/url]
--
Regards
Robert
Smile... it increases your face value!
----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
[url]http://www.newsfeeds.com[/url] The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Re: port forwarding on loopback device
[email]thomas.fazekas@gmail.com[/email] wrote:[color=blue]
> Hi,
>
> I want to forward a port bellow 1024 (let's say 889) to port above
> 1024 (8080),
> all this on loopback device. Is that possible ? I've tried :
>
> sudo iptables -t nat -A PREROUTING -p tcp --dport 889 -i lo -j
> REDIRECT --to-port 8080
>
> On 808 I've got a tomcat running, than I've tried to telnet to
> 127.0.0.1 on 889
> an I get
> Trying 127.0.0.1...
> telnet: Unable to connect to remote host: Connection refused
>
> What am I doing wrong ?
>[/color]
For port forwarding on lo, you need to use
the OUTPUT chain instead of PREROUTING.
--
Tauno Voipio
tauno voipio (at) iki fi