Hallo zusammen, mal was für die iptables-Leute:
Ich habe es heute sshdfilter[1] installiert und die Log-Datei sagt zwar auch ordnungsgemäß (hier im debug-Mode), --------8<-------- Dec 15 16:41:02 mail sshdfilt[4931]: sshdfilter 1.4.2 starting up, running sshd proper Dec 15 16:41:02 mail sshdfilt[4931]: repurgetime=7200 Dec 15 16:41:02 mail sshdfilt[4931]: maxblocktime=259200 Dec 15 16:41:02 mail sshdfilt[4931]: maxchances=6 Dec 15 16:41:02 mail sshdfilt[4931]: interface=eth0 Dec 15 16:41:02 mail sshdfilt[4931]: sshdpath=/usr/sbin/sshd Dec 15 16:41:02 mail sshdfilt[4931]: ip6toip4=1 Dec 15 16:41:02 mail sshdfilt[4931]: iptables command=iptables Dec 15 16:41:02 mail sshdfilt[4931]: debug=1 Dec 15 16:41:02 mail sshdfilt[4931]: sshd args= Dec 15 16:41:03 mail sshdfilt[4931]: Flushing SSHD chain Dec 15 16:41:03 mail sshd[4932]: Server listening on :: port 10622. Dec 15 16:41:15 mail sshdfilt[4931]: INVALID: user=blubb, ip=80.156.155.80 Dec 15 16:41:15 mail sshdfilt[4931]: Illegal user name, instant block of 80.156.155.80 Dec 15 16:41:15 mail sshdfilt[4931]: pre mail command is $mailcommand="mail -s \"sshdfilter event for $ip, $event\" [EMAIL PROTECTED]" Dec 15 16:41:15 mail sshdfilt[4931]: post mail command is mail -s "sshdfilter event for 80.156.155.80, Illegal user name, instant block" [EMAIL PROTECTED] -------->8-------- wenn ich es allerdings danach direkt wieder probiere... --------8<-------- Dec 15 16:41:15 mail sshd[4932]: Illegal user blubb from ::ffff:80.156.155.80 Dec 15 16:41:15 mail sshd[4932]: input_userauth_request: illegal user blubb Dec 15 16:41:15 mail sshd[4932]: Failed none for illegal user blubb from ::ffff:80.156.155.80 port 32862 ssh2 -------->8-------- ... wird er nicht direkt abgewiesen, sondern sshd prüft noch den User, obwohl er ja geblockt werden sollte. Laut INSTALL im sshdfilter-Paket sollte eine DROP-Rule vorhanden sein. Ist sie aber nicht: --------8<-------- mail:~# iptables -L Chain INPUT (policy ACCEPT) target prot opt source destination SSHD tcp -- anywhere anywhere tcp dpt:10622 Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination Chain SSHD (1 references) target prot opt source destination -------->8-------- Ich habe nur iptables installiert, also kein Programm was darauf aufsetzt. Folglich werden im Start-Skript nur diese beiden Einträge an iptables übergeben: --------8<-------- iptables -N SSHD iptables -A INPUT -p tcp -m tcp --dport 10622 -j SSHD -------->8-------- Fehlt da etwas? Muss iptables noch Grundeinstellungen mitbekommen oder sollte das eigentlich als reichen? Die INSTALL sagt dazu nur: --------8<-------- This is only an example, I've no idea how you set up your iptables. Generally yo u'll have a line that ACCEPTS ssh(port 22), and the above should go on the line before. -------->8-------- Auf der Kiste läuft sonst ja kein iptables, alle Zugänge und Regeln werden ja von der Haupt-Firewall geregelt. Aber dennoch hab ich mal eine zusätzliche ACCEPT-Rule für ssh eingefügt, das hat aber auch nichts gebracht. Google findet leider keine konkreten iptables-Beispiele für sshdfilter. Irgendwelche Ideen, was fehlt? Tnx. [1] http://www.csc.liv.ac.uk/~greg/sshdfilter/ -- LG, Ace

