LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 08-21-2012, 07:58 AM   #1
druisgod
Member
 
Registered: Jun 2004
Location: Maine
Distribution: LFS Mint OS, LFS, CENTos,
Posts: 119

Rep: Reputation: 18
SSH Tunneling issues


I have an externally hosted website with bluehost.com and a simple network here at work.

The external website I have connects back through a reverse tunnel to my ldap server on my local network. I have a script that goes out very 10 minutes (via cron) and checks to make sure that the connection is up and if not, it restarts it. The issue is that the script that I wrote works once or twice and then sometimes not at all.

Bluehost will not let me run a ldap server. I could port forward through my firewall, but would rather tunnel to keep ports closed.

The question I have is if there is a simpler method of doing this that is as secure as a tunnel? The tunnel works fine if I run it by hand. It's flaky if run it by script.
 
Old 08-21-2012, 08:17 AM   #2
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,671
Blog Entries: 4

Rep: Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945
OpenVPN comes to mind. I don't know if Bluehost supports it (don't know anything at all about them), but maybe a few phone-calls will answer some questions there, or open some doors. My general feeling is that this technology is the one more commonly used for (commercial grade) cryptographically secured tunneling.
 
Old 08-23-2012, 10:08 AM   #3
Quantumstate
Member
 
Registered: Jun 2005
Location: Seattle, Ecotopia
Distribution: CentOS 7.4 with KDE
Posts: 262

Rep: Reputation: 22
Reverse tunnelling is wonderful, isn't it. Very few understand it but it is so useful.

I'm running reverse tunnels as well, and haven't been able to make them come up with NetworkMangler. Should run from the /etc/network/if-up.d dir, but I always have to run the script by hand, even though I have a wait 10. I suspect it has to do with slow association of wifi.

Once mine's run it generally stays up until I put the machine asleep. I have it set up for the 'sleeper' user, as per directions I found once out there. Here's one of my entries:
/usr/bin/ssh -v -f -l sleeper -i /home/sleeper/.ssh/id_ecdsa -2 -4 -c aes256-ctr,aes128-ctr -L 6543:localhost:6543 droog sleep 365d

Search on sleeper and reverse tunnel and you should find what you need.

How about sharing your cron file?

Last edited by Quantumstate; 08-23-2012 at 11:29 AM.
 
Old 08-24-2012, 09:22 AM   #4
Reuti
Senior Member
 
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 15.2
Posts: 1,339

Rep: Reputation: 260Reputation: 260Reputation: 260
There is autossh.
 
  


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
SSH server and SSH tunneling Achical Linux - Security 5 05-20-2012 10:07 AM
SSH Tunneling Lumio Linux - Networking 12 08-17-2011 04:28 PM
SSH tunneling xeon123 Linux - Security 1 12-09-2009 07:41 AM
Tunneling with ssh ssherman Linux - Networking 3 07-16-2007 02:13 AM
SSH tunneling X AzZuM Linux - Security 3 11-27-2004 01:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

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