LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-05-2013, 08:46 PM   #1
jddancks
LQ Newbie
 
Registered: Jan 2013
Location: Central NY
Distribution: Mac, debian
Posts: 29

Rep: Reputation: Disabled
Port knocking utility: How to monitor sshd?


I am looking around for a simple port knocking utility that will open, allow exception on port 22 for whatever IP, and immediately close when the connection is closed.

I was messing with cd00r.c, which appears to work, but I would need to edit the file for my purposes, but to do that I need to learn how to use pcap, and I was wondering if there was an easier way, like when cd00r gets the right combo, it would run (apparently you put this in yourself, cd00r.c does nothing by default)
Code:
execv(sprintf("iptables -A INPUT -i %s -s %s -j ACCEPT",CDR_INTERFACE,in_addr));
and then run an opposite command when cd00r detects a FIN packet. I wonder if there is some simple script or file I can edit that sshd would execute or execute when the sshd closes a connection?
 
Old 03-07-2013, 09:49 AM   #2
bmrtin
LQ Newbie
 
Registered: Jan 2004
Location: georga
Distribution: fendora
Posts: 11

Rep: Reputation: 4
I dont know if this will help but I have found these 2 sites:
https://help.ubuntu.com/community/PortKnocking
http://www.marksanborn.net/linux/add...xtra-security/

Looks like an interesting idea and I may have to try...
 
1 members found this post helpful.
  


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 in Shorewall wsduvall Linux - Security 5 04-06-2009 06:45 AM
Asking about port knocking adam_blackice Linux - Security 6 06-24-2008 11:59 AM
Port Knocking through ssh tunnel metallica1973 Linux - Security 10 03-05-2008 09:00 PM
Does anyone here use port knocking? 144419855310001 General 4 10-07-2007 08:37 AM
port knocking only for ssh port? xpucto Linux - Security 1 03-29-2007 08:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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