fail2ban auf vServer einrichten

Flash613

New Member
Hallo zusammen,

ich habe nun einen vServer und wollte "mal eben" fail2ban installieren. Zuerst habe ich gleich versucht auf einen geänderten SSH Port fail2ban wirksam zu machen doch trotz gleicher Einstellungen wie auf meiner VMware Maschine ließ sich der Server nix anmerken. Daher habe ich nun versucht mit Standartport und allen Configs unverändert eine Wirkung zu erzielen doch fail2ban hat keine Wirkung. Mir ist aufgefallen das unter /var/log/fail2ban.log sofort nach der Installation schon ein Error auftritt:
Code:
2008-12-31 14:41:25,373 fail2ban.jail   : INFO   Using poller
2008-12-31 14:41:25,377 fail2ban.filter : INFO   Created Filter
2008-12-31 14:41:25,377 fail2ban.filter : INFO   Created FilterPoll
2008-12-31 14:41:25,378 fail2ban.filter : INFO   Added logfile = /var/log/auth.log
2008-12-31 14:41:25,378 fail2ban.filter : INFO   Set maxRetry = 6
2008-12-31 14:41:25,379 fail2ban.filter : INFO   Set findtime = 600
2008-12-31 14:41:25,379 fail2ban.actions: INFO   Set banTime = 600
2008-12-31 14:41:25,381 fail2ban.filter : INFO   Set failregex = (?:(?:Authentication failure|Failed [-/\w+]+) for(?: [iI](?:llegal|nvalid) user)?|[Ii](?:llegal|nvalid) user|ROOT LOGIN REFUSED) .*(?: from|F$
2008-12-31 14:41:25,382 fail2ban.filter : INFO   Set ignoreregex =
2008-12-31 14:41:25,382 fail2ban.actions.action: INFO   Set actionBan = iptables -I fail2ban-<name> 1 -s <ip> -j DROP
2008-12-31 14:41:25,383 fail2ban.actions.action: INFO   Set actionStop = iptables -D INPUT -p <protocol> --dport <port> -j fail2ban-<name>
iptables -F fail2ban-<name>
iptables -X fail2ban-<name>
2008-12-31 14:41:25,384 fail2ban.actions.action: INFO   Set actionStart = iptables -N fail2ban-<name>
iptables -A fail2ban-<name> -j RETURN
iptables -I INPUT -p <protocol> --dport <port> -j fail2ban-<name>
2008-12-31 14:41:25,384 fail2ban.actions.action: INFO   Set actionUnban = iptables -D fail2ban-<name> -s <ip> -j DROP
2008-12-31 14:41:25,385 fail2ban.actions.action: INFO   Set actionCheck = iptables -n -L INPUT | grep -q fail2ban-<name>
[COLOR="Red"]2008-12-31 14:41:25,396 fail2ban.actions.action: ERROR  iptables -N fail2ban-ssh[/COLOR]
iptables -A fail2ban-ssh -j RETURN
iptables -I INPUT -p tcp --dport ssh -j fail2ban-ssh returned 300

Wenn ich "iptables -N fail2ban-ssh" in die Console eintrage lautet die Ausgabe:
Code:
FATAL: Could not load /lib/modules/2.6.22-3-vserver-amd64/modules.dep: No such file or directory
iptables v1.3.6: can't initialize iptables table `filter': Permission denied (you must be root)
Perhaps iptables or your kernel needs to be upgraded.

Ich bin als root eingeloggt und als Betriebssystem nutzte ich aktuell Debian Etch 32Bit doch auch ein Test mit Debian Etch 64Bit brachte kein anderes Ergebnis.

Wie bekomme ich fail2ban zum laufen?
 
Bei welchem Hoster hast du deinen Vserver?
Sieht fast so aus, als hätte dein Vserver Kenerl nicht den iptables filter mit einkompiliert. Wenn dem so ist, hast du ein Problem, da du den Kernel eines Vservers nicht ändern kannst.

Kannst du iptables per Hand ausführen? Beispielsweise: iptables -L
 
Ich bin bei netcup.de dachte das wäre eine gute Idee...

Ich kann iptables nicht manuell ausführen :( das erklärt natürlich einiges... Was kann ich alternativ machen?
 
Back
Top