Frage Port Knocking

Rund um die Sicherheit des Systems und die Applikationen
AWOHille
Posts: 274
Joined: 2011-09-05 09:00
 

Frage Port Knocking

Post by AWOHille »

Hallo,

ich habe auf einem lokalen Testserver mal Port Knocking installiert.

/etc/default/knockd

Code: Select all

START_KNOCKD=1
/etc/knockd.conf

Code: Select all

[options]
	UseSyslog
	logfile = /var/log/knockd.log

[openSSH]
	sequence    = 7000,8000,9000
	seq_timeout = 10
	command     = /sbin/iptables -A INPUT -s %IP% -p tcp --dport 64000 -j ACCEPT
	tcpflags    = syn

[closeSSH]
	sequence    = 9000,8000,7000
	seq_timeout = 10
	command     = /sbin/iptables -D INPUT -s %IP% -p tcp --dport 64000 -j ACCEPT
	tcpflags    = syn

/etc/init.d/knockd start

Trotzdem kann ich mich über ssh, ohne vorher anzuklopfen, einloggen. Wo liegt der Fehler?
User avatar
daemotron
Administrator
Administrator
Posts: 2641
Joined: 2004-01-21 17:44
 

Re: Frage Port Knocking

Post by daemotron »

Bin kein iptables-Experte, aber müsste die Regel in closeSSH nicht mit -j REJECT enden?
“Some humans would do anything to see if it was possible to do it. If you put a large switch in some cave somewhere, with a sign on it saying 'End-of-the-World Switch. PLEASE DO NOT TOUCH', the paint wouldn't even have time to dry.” — Terry Pratchett, Thief of Time
AWOHille
Posts: 274
Joined: 2011-09-05 09:00
 

Re: Frage Port Knocking

Post by AWOHille »

daemotron wrote:Bin kein iptables-Experte, aber müsste die Regel in closeSSH nicht mit -j REJECT enden?
Nein, das ist soweit ok. Habe aber mittlerweile den Fehler in der iptables gefunden. Port Knocking läuft soweit problemlos.

Gruß Hille