Rund um die Sicherheit des Systems und die Applikationen
AWOHille
Posts: 274 Joined: 2011-09-05 09:00
Post
by AWOHille » 2011-11-21 09:53
Hallo,
ich habe auf einem lokalen Testserver mal Port Knocking installiert.
/etc/default/knockd
/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?
daemotron
Administrator
Posts: 2641 Joined: 2004-01-21 17:44
Post
by daemotron » 2011-11-21 11:05
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
Post
by AWOHille » 2011-11-23 23:08
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