LinuxQuestions.org
Help answer threads with 0 replies.
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 03-17-2009, 04:58 AM   #1
Gerrit Jan
LQ Newbie
 
Registered: Oct 2005
Location: Amersfoort, Netherlands
Distribution: Debian, ubuntu
Posts: 10

Rep: Reputation: 0
Question Forward Port to SSH Tunnel


Hello,

I have a problem, I want to forward ports trough a SSH tunnel because I cannot open ports. So my idea was to setup a SSH tunnel from my Windows server to a remote location (a linux server of a friend of my) on the remote location I forward some ports in the modem/router to the linux server.
I have al this working. The problem I have is that when the traffic from the internet arrives at the linux server the server isn't sending it to the ssh tunnel (same port number).

Nmap is telling me that the port is forwarded through the modem:
Quote:
Starting Nmap 4.53 ( http://insecure.org ) at 2009-03-17 06:57 CET
Interesting ports on *****:
PORT STATE SERVICE
10422/tcp filtered unknown

Nmap done: 1 IP address (1 host up) scanned in 0.315 seconds
But when i run a nmap to the localhost it reports that the port isn't open
Quote:
Starting Nmap 4.53 ( http://insecure.org ) at 2009-03-17 06:57 CET
Interesting ports on localhost (127.0.0.1):
PORT STATE SERVICE
10422/tcp closed unknown

Nmap done: 1 IP address (1 host up) scanned in 0.084 seconds
netstat -tunelp | grep 10422 is telling me that the Linux server is listing to port 10422 (configured by me)
Quote:
tcp 0 0 127.0.0.1:10422 0.0.0.0:* LISTEN 1002 19230 6896/1
tcp6 0 0 ::1:10422 :::* LISTEN 1002 19231 6896/1
When I run Links2 127.0.0.1:10422 the index of the webserver on the Windows server is shown, so the tunnel is working.

On the Windows server I use putty to make the tunnel (R10422 to localhost:80)

I there anyone who can tell me how to forward the traffic from port 10422 to the tunnel (127.0.0.1:10422).

Below is a graphic with the situation.
http://gerritjanfaber.nl/afbeeldingen/tweakers/idee.jpg

Gerrit jan
 
Old 03-18-2009, 05:53 AM   #2
Gerrit Jan
LQ Newbie
 
Registered: Oct 2005
Location: Amersfoort, Netherlands
Distribution: Debian, ubuntu
Posts: 10

Original Poster
Rep: Reputation: 0
Kick
 
  


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
Port Knocking through ssh tunnel metallica1973 Linux - Security 10 03-05-2008 09:00 PM
DISCUSSION: Forward ports via an SSH tunnel with auto reconnect (using key pair authentication) merize147 LinuxAnswers Discussion 0 07-24-2006 04:31 PM
ssh port forward/tunnel question djwhitey Linux - Networking 4 04-06-2006 04:05 PM
SSH forward (tunnel) overhead ? michaelsanford Linux - Networking 2 07-31-2005 05:58 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:14 PM.

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