LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


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

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


Hi,

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@10.0.0.8 -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 -

Code:
root@bt:~# netstat -anp | grep 11111
tcp        0      0 0.0.0.0:11111           0.0.0.0:*               LISTEN      25710/3
when I try to connect to the listening port from my browser (http://10.0.0.8:11111) 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 0.0.0.0, 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 127.0.0.1 or "::::".


Thanks!
 
  


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:22 AM.

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