Networking Forums

Networking Forums > Computer Networking > Linux Networking > port forwarding on loopback device

Reply
Thread Tools Display Modes

port forwarding on loopback device

 
 
thomas.fazekas@gmail.com
Guest
Posts: n/a

 
      06-06-2007, 08:23 AM
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 ?

 
Reply With Quote
 
 
 
 
Robert
Guest
Posts: n/a

 
      06-09-2007, 01:20 AM
On Wed, 06 Jun 2007 08:23:32 +0000, thomas.fazekas wrote:

> 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 ?


http://iptables.rlworkman.net/chunkyhtml/x4529.html


--

Regards
Robert

Smile... it increases your face value!


----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
 
Reply With Quote
 
Tauno Voipio
Guest
Posts: n/a

 
      06-13-2007, 04:21 PM
(E-Mail Removed) wrote:
> 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 ?
>


For port forwarding on lo, you need to use
the OUTPUT chain instead of PREROUTING.

--

Tauno Voipio
tauno voipio (at) iki fi
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: problem with ethernet loopback test using loopback plug/stub: receiving socket not seeing packet. Rick Jones Linux Networking 10 08-22-2010 07:17 PM
port tunneling over ssh (not port-forwarding in the traditional sense) C3 Linux Networking 1 07-26-2006 03:44 PM
Help with port forwarding to an internal NAS device? Bob_M Network Routers 0 06-24-2005 11:33 AM
Port forwarding on Conexant 4 port adsl router Graham Russell Broadband 1 10-17-2003 11:09 AM
Stupid Question: Port Triggering vs. Port Forwarding Bryce Wireless Internet 3 09-09-2003 05:45 AM



1 2 3 4 5 6 7 8 9 10 11