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 05-31-2013, 02:16 AM   #1
ccaaee
LQ Newbie
 
Registered: Dec 2010
Posts: 12

Rep: Reputation: 0
reverse ssh middleman


Hi

I am trying to set up a ssh tunnel but the server is behind a firewall which I can't modify. It would seem that the obvious solution is reverse ssh tunneling and the internet is abound with tutorials. The problem is that if you're traveling around the client may also be behind a firewall.

The solution to this is the "middleman". The server connects to the middleman, opens a forwarded port then the client connects to the middleman and has access to the server via the previously opened forwarded port.

Unfortunately, the middleman I have access to does not allow port forwarding which is a necessary prerequisite.

Does anyone know of:
a) a hack
b) a free hosting service which would allow ssh with port forwarding
???

Thanks

CC
 
Old 05-31-2013, 02:59 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,838

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
probably your home pc or router can do the job...
 
Old 05-31-2013, 04:26 PM   #3
ccaaee
LQ Newbie
 
Registered: Dec 2010
Posts: 12

Original Poster
Rep: Reputation: 0
If I happen to be in a hotel room on the other side of the world when I want to connect to the server, neither my "home pc or router" are of much use to me. This is the situation where the reverse ssh with middleman technique would seem to be the only solution.

Thanks anyway

CC
 
Old 06-02-2013, 12:54 AM   #4
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora/Pop!_OS
Posts: 2,983

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
i think pan64 was saying use your home PC as the middle man server. setup either a static IP, or some form of dynamicDNS via your router and make the connection from your work to the home PC and be done with it.

if things get real nasty for you, then you could always buy a small web server that runs linux and that you have 100% control over. then you can set it up how you like for the reverse ssh connection. heck for something like that you could probably get it for as little as 10-20$ month.

or better yet, have your company provide you with a road warrior VPN connection.
 
Old 06-03-2013, 08:55 PM   #5
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,371

Rep: Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749
The solution is to use a dynamic DNS address as the 'middleman'. The server behind the firewall is set to call out to the dynamic DNS address. (I use a cron job on the server to run a script based on that here http://www.brandonhutchinson.com/ssh_tunnelling.htmlto do this.) The client updates the dynamic DNS address when you connect to the internet from the location from where you want to use the tunnel.
Possible problems are:
- traffic on the standard SSH port may not be allowed. Consider (ab)using the HTTPS port instead.
- if the internet connection is broken during a tunnelled session, you need to stop and restart the sshd daemon on the client, then wait for the server to connect again.
 
  


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
[SOLVED] Reverse SSH in Slackware rkelsen Slackware 16 04-30-2013 04:59 AM
[SOLVED] Reverse SSH tunnel edan Linux - Security 3 07-14-2010 09:37 PM
SSH reverse pipe C4N4rD Linux - Networking 6 03-07-2010 12:29 PM
reverse ssh? slashcom Linux - Software 3 08-12-2004 10:51 PM

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

All times are GMT -5. The time now is 07:01 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