The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Socket programming:One server two port abc.working UNIX for Dummies Questions & Answers 1 10-17-2007 09:32 AM
Old ATT Server Port Question kctech UNIX for Dummies Questions & Answers 2 11-17-2006 04:23 PM
which port to write my server application? rraajjiibb UNIX for Advanced & Expert Users 0 12-18-2005 11:42 PM
VNC Server http listening port kxchen_home Linux 6 02-06-2004 09:23 PM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 09-11-2008
Registered User
 

Join Date: Aug 2008
Posts: 2
ssh port forward over three server

Hello there,

I have a big problem, and I hope somebody can help me. I try to realize a port forward over three server. Here is a picture...

Client Server1 | Server2
------- ------- | -------
|...... | |...... | | |...... |
|...... | |...... | | |...... |
|...... | |...... | | |...... |
|...... | |...... | | |...... |
------- ------- | -------

Server2 is behind a firewall. Server1 is able to connect via ssh to server2.
The Client is able to connect via ssh to Server1.

From Server1 I can make a port forward like this.

Server1> ssh -L 1111:server2:2222 server2

This works fine.
But I want to connect the Port 1111 from the Client.

Client> ssh -L 1111:server1:1111 server1
This did not help.
What is wrong?
All the servers are UNIX servers.

Many thanks for your help!
Reply With Quote
Forum Sponsor
  #2  
Old 09-13-2008
Registered User
 

Join Date: Dec 2007
Posts: 12
My guess it you can only ssh to server2 fron server1 due to a rule in the firewall.
You might want to try the forward from server1 to server2 and connecting with tour client to the (forwarded) port on server1.
(the forwarded port on the server may be bound to localhost, there might be an option to avoid this)

If you really can't access the port on server1 fron client, you can use two seperate ssh tunnels:
server1> ssh -L 2222:server2:1111
# Leave this one open
client> ssh -L 1111:server1:2222

This will forward port 1111 on client to port 2222 on server1, which is forwarded to port 1111 on server2.
(different port servers only as illustration)
Reply With Quote
  #3  
Old 09-18-2008
Registered User
 

Join Date: Aug 2008
Posts: 2
I already tried that. It does not function. Somebody another idea?
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 09:54 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0