LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 04-01-2009, 04:25 AM   #1
littlebigman
Member
 
Registered: Aug 2008
Posts: 463

Rep: Reputation: 32
Question Simpler knockd to open SSH on remote server?


Hello

I'm looking for a way to open up the SSH port on a remote server behind a NAT firewall so I can connect from the Net (from a Windows host) while reducing the risk of running SSHd at all times.

I've never used it, but it seems like Knockd is close to what I'm looking for (trying to connect to several specific ports within a certain timeframe will launch SSHd), but that would require opening up several ports on the router just for Knockd. I find the alternative of using one-time sequences too complicated.

Does someone know of a simpler system, where the daemon would be listening to a _single port_ and launch SSHd if it got -_specific data patterns_ in TCP packets?

Thank you.
 
Old 04-01-2009, 07:13 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
Not sure, but wouldn't a "specific pattern" basically be a password? if so, I'd rather pass that password over a secure ssh connection than a raw tcp socket. You could easily write a simple xinetd daemon to listen on a port and use netcat to pipe whatever recieved data you get into a simple script, but the point of port knocking is that no data is ever allowed IN to the system, which wouldn't be that case in your model.

If you do want to persist with this, you can do most of it within iptables, no need for a daemon in itself.

http://www.debian-administration.org/articles/268

Based on this you could introduce a "-m match" check to watch the contents of a stream. As to how to get that stream set up in the first place though, again i'd suggest netcat just sending everything to /dev/null

Last edited by acid_kewpie; 04-01-2009 at 07:38 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Redhat9 ssh Remote X Display Can't Open under windows xp dreamcarrior Linux - Networking 1 10-05-2008 01:21 AM
SSH timeout on remote server investmentbnker75 Linux - Networking 3 04-11-2008 04:00 PM
SSH Error to remote Server shawnbishop Linux - Software 1 06-04-2007 02:50 AM
Passwordless SSH with SSH commercial server and open ssh cereal83 Linux - General 7 04-18-2006 01:34 PM
copy files using SSH from a server to another..both remote Santosh_d Linux - Networking 6 03-11-2004 12:02 AM


All times are GMT -5. The time now is 10:20 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration