Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 05-16-2011, 01:48 PM   #1
LQ Newbie
Registered: May 2011
Posts: 1

Rep: Reputation: 0
can't connect to listening port (reverse tunnel\port forwarding)


I'm using plink on my win' machine to create a SSH tunnel through my backtrack5 machine (it's based on ubuntu).

what I'm trying to do is to port forward every tcp packet that is sent to the SSH server on the listening port (11111) back to my local windows machine (on 80 - IIS\HTTP).

from the windows machine I run plink -

plink.exe -v -N -R 11111:localhost:80 root@ -P 22 -pw password

I've edit the sshd_config on the SSH server and added "GatewayPorts yes" so I'll be able to bind the port to all interfaces.

after I run the plink this is what I get in my SSH server -

root@bt:~# netstat -anp | grep 11111
tcp        0      0 *               LISTEN      25710/3
when I try to connect to the listening port from my browser ( I get "Bad Request - Invalid Hostname" (HTTP Error 400. The request hostname is invalid.).

when I browse to http://localhost I get the IIS homepage.

what can I do to debug it?

BTW - on another machine (centos) I couldn't bind ports to, when I add "GatewayPorts yes" to the sshd_config it listens on ::::ort (and it isn't accepting any connections from outside the machine), nothing I done made it listen on all interfaces, just or "::::".



Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Reverse Tunneling / Reverse port forwarding in SSH dynamics Linux - Networking 5 02-07-2017 07:19 AM
ssh tunnel port forwarding andycol Linux - Server 2 03-18-2010 07:01 AM
Multiple hop tunnel to chain port forwarding philosophia Linux - Newbie 2 02-02-2010 09:27 AM
Tool for listening on a network port and forwarding data to an application? grayFalcon Linux - Server 4 10-07-2009 04:09 AM
ssh tunnel / port forwarding Q FrayAdjacent Linux - Networking 2 07-05-2005 03:37 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:57 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration