Zurück   RR:Board > Computer > Linux & BSD

GNU/Linux, Debian, Ubuntu, Suse, FreeBSD, OpenBSD... Hilfe zu Installation, Konfiguration, Software und Scripting.
Thema geschlossen
 
Themen-Optionen Thema durchsuchen

CentOs x64 Fail2ban Konfiguration und sslh konfiguration
Alt 15.06.2012, 19:27   # 1
Excelsus
Kabel Wurm
rot rot rot 
Bewertung:
Excelsus 200k+ Inflation
Registriert seit: May 2007
Internet: Modem/ISDN
Beiträge: 1.001
Power: 58
Hallo zusammen,

so Server läuft alles schön. Nun wollte ich noch Fail2ban ein wenig gesprächiger machen und mir Mails schicken lassen etc.... Nur irgendwie will der driss nicht so wie ich will... Oder kennt wer eine gute Alternative?

Kennt sich auch wer mit sslh aus?

Hat irgendwer eine gute Anleitung für CentOS und Fail2ban? Bin am Verzweifeln. Oder hat wer eine gute Konfiguration? Vielleicht sogar direkt noch ein paar Jails für ungebetene Gäste wie zum Beispiel dfind?!


Standard Konfiguration:
Code:
# Fail2Ban configuration file # # Author: Cyril Jaquier # # $Revision: 747 $ # # The DEFAULT allows a global definition of the options. They can be override # in each jail afterwards. [DEFAULT] destemail = empfänger@googlemail.com banaction = iptables-multiport mta = sendmail ignoreip = 127.0.0.1 10.10.30.0/24 10.10.20.0/24 10.10.10.0/24 10.10.0.0/24 bantime = 86400 findtime = 600 maxretry = 2 backend = auto [ssh-iptables] enabled = true filter = sshd action = iptables[name=SSH, port=ssh, protocol=tcp] sendmail-whois[name=SSH, dest=root, sender=fail2ban@example.com] logpath = /var/log/secure maxretry = 2 [proftpd-iptables] enabled = false filter = proftpd action = iptables[name=ProFTPD, port=ftp, protocol=tcp] sendmail-whois[name=ProFTPD, dest=you@example.com] logpath = /var/log/proftpd/proftpd.log maxretry = 6 [sasl-iptables] enabled = false filter = sasl backend = polling action = iptables[name=sasl, port=smtp, protocol=tcp] sendmail-whois[name=sasl, dest=you@example.com] logpath = /var/log/mail.log [ssh-tcpwrapper] enabled = true filter = sshd action = hostsdeny sendmail-whois[name=SSH, dest=you@example.com] ignoreregex = for myuser from logpath = /var/log/secure [apache-tcpwrapper] enabled = true filter = apache-auth action = hostsdeny logpath = /var/log/apache*/*error.log /var/www/kbc*/logs/*error* /var/www/vpa*/logs/*error* maxretry = 2 [postfix-tcpwrapper] enabled = false filter = postfix action = hostsdeny[file=/not/a/standard/path/hosts.deny] sendmail[name=Postfix, dest=you@example.com] logpath = /var/log/postfix.log bantime = 300 [vsftpd-notification] enabled = false filter = vsftpd action = sendmail-whois[name=VSFTPD, dest=you@example.com] logpath = /var/log/vsftpd.log maxretry = 5 bantime = 1800 [vsftpd-iptables] enabled = false filter = vsftpd action = iptables[name=VSFTPD, port=ftp, protocol=tcp] sendmail-whois[name=VSFTPD, dest=you@example.com] logpath = /var/log/vsftpd.log maxretry = 5 bantime = 1800 [apache-badbots] enabled = true filter = apache-badbots action = iptables-multiport[name=BadBots, port="http,https"] sendmail-buffered[name=BadBots, lines=5, dest=you@example.com] logpath = /var/www/*/logs/access_log /var/log/apache*/*access* /var/www/kbc*/logs/*access* /var/www/vpa*/logs/*access* bantime = 172800 maxretry = 1 [apache-shorewall] enabled = true filter = apache-noscript action = shorewall sendmail[name=Postfix, dest=you@example.com] logpath = /var/log/httpd/error_log [php-url-fopen] enabled = false port = http,https filter = php-url-fopen logpath = /var/www/*/logs/access_log maxretry = 1 [ssh-ipfw] enabled = false filter = sshd action = ipfw[localhost=192.168.0.1] sendmail-whois[name="SSH,IPFW", dest=you@example.com] logpath = /var/log/auth.log ignoreip = 168.192.0.1

Die Konfiguration die ich Nutzen möchte:

Code:
[DEFAULT] destemail = empfänger@googlemail.com banaction = iptables-multiport mta = sendmail ignoreip = 127.0.0.1 10.10.30.0/24 10.10.20.0/24 10.10.10.0/24 10.10.0.0/24 bantime = 99999999 findtime = 600 maxretry = 2 backend = polling ############SSH########## [ssh-iptables] enabled = true filter = sshd action = iptables[name=SSH, port=ssh, protocol=tcp] sendmail-whois[name=SSH, dest=empfänger@gmail.com, sender=fail2ban@nemesis.example.de] logpath = /var/log/secure maxretry = 2 [ssh-tcpwrapper] enabled = true filter = sshd action = hostsdeny sendmail-whois[name=SSH, dest=empfänger@gmail.com, sender=fail2ban@nemesis.example.de] ignoreregex = for myuser from logpath = /var/log/secure ###########APACHE#### [apache-tcpwrapper] enabled = true filter = apache-auth action = hostsdeny logpath = /var/log/apache*/*error.log /var/www/kbc*/logs/*error* /var/www/vpa*/logs/*error* maxretry = 2 [apache-badbots] enabled = true filter = apache-badbots action = iptables-multiport[name=BadBots, port="http,https"] sendmail-buffered[name=BadBots, lines=5, dest=empfänger@gmail.com, sender=fail2ban@nemesis.example.de] logpath = /var/www/*/logs/access_log /var/log/apache*/*access* /var/www/kbc*/logs/*access* /var/www/vpa*/logs/*access* bantime = 999999 maxretry = 1 [apache-shorewall] enabled = true filter = apache-noscript action = shorewall sendmail[name=Postfix, dest=empfänger@gmail.com, sender=fail2ban@nemesis.example.de] logpath = /var/www/*/logs/error* /var/log/apache*/*error* /var/www/kbc*/logs/*error* /var/www/vpa*/logs/*error* [php-url-fopen] enabled = true port = http,https filter = php-url-fopen logpath = /var/www/*/logs/access_log /var/log/apache*/*access* /var/www/kbc*/logs/*access* /var/www/vpa*/logs/*access* maxretry = 1 [postfix] enabled = false filter = postfix action = iptables[name=Postfix, port=smtp, protocol=tcp] sendmail-whois[name=Postfix, est=empfänger@gmail.com, sender=fail2ban@nemesis.example.de] logpath = /var/log/maillog maxretry = 2 [proftpd-iptables] enabled = false filter = proftpd action = iptables[name=ProFTPD, port=ftp, protocol=tcp] sendmail-whois[name=ProFTPD, dest=empfänger@gmail.com, sender=fail2ban@nemesis.example.de] logpath = /var/log/secure maxretry = 3 [sasl-iptables] enabled = false filter = sasl backend = polling action = iptables[name=sasl, port=smtp, protocol=tcp] sendmail-whois[name=sasl, dest=empfänger@gmail.com, sender=fail2ban@nemesis.example.de] logpath = /var/log/mail.log # Fail2Ban filter.d/postfix.local configuration file ################################################ # www.sonoracomm.com # [Definition] failregex = reject: RCPT from (.*)\[\]: 554 reject: RCPT from (.*)\[\]: 550 reject: RCPT from (.*)\[\]: 450 ignoreregex = # Fail2Ban action.d/sendmail-whois.local configuration file ################################################ # www.sonoracomm.com # [Definition] actionstart = echo -en "Subject: [Fail2Ban] : started From: Fail2Ban <> To: \n Hi,\n The jail has been started successfully.\n Regards,\n Fail2Ban" | /usr/sbin/sendmail -f actionstop = echo -en "Subject: [Fail2Ban] : stopped From: Fail2Ban <> To: \n Hi,\n The jail has been stopped.\n Regards,\n Fail2Ban" | /usr/sbin/sendmail -f actioncheck = actionban = echo -en "Subject: [Fail2Ban] : banned From: Fail2Ban <> To: \n Hi,\n The IP has just been banned by Fail2Ban after attempts against .\n\n Here are more information about :\n `/usr/bin/dig -x `\n Regards,\n Fail2Ban" | /usr/sbin/sendmail -f actionunban = [Init] name = default dest = empfänger@gmail.com sender = fail2ban

Meist belehrt erst der Verlust über den Wert der Dinge.
Zeig mir einen Platz zum verweilen und ich werde die Welt bewegen!
  Excelsus ist offline  

Alt 16.06.2012, 11:52   # 2
dreamax
Hellraiser
blau blau blau blau 
Bewertung:
dreamax hat mehr als 25.000 Punktedreamax hat mehr als 25.000 Punktedreamax hat mehr als 25.000 Punktedreamax hat mehr als 25.000 Punktedreamax hat mehr als 25.000 Punktedreamax hat mehr als 25.000 Punktedreamax hat mehr als 25.000 Punktedreamax hat mehr als 25.000 Punktedreamax hat mehr als 25.000 Punktedreamax hat mehr als 25.000 Punkte
dreamax hat mehr als 25.000 Punktedreamax hat mehr als 25.000 Punktedreamax hat mehr als 25.000 Punktedreamax hat mehr als 25.000 Punkte
Registriert seit: Oct 2005
Beiträge: 3.602
Power: 41
google suche und vorallem die fail2ban manual gelesen? Ich vermute mal das dies nicht der Fall ist, was du aber, sofern du es verstehen willst, nachholen solltest.

btw. "-1" = "für immer" (wobei ich da aufpassen würde..)


€ Linux / Unix / Windows - Hilfestellung / Installation / Management €
  dreamax ist offline  

AW: CentOs x64 Fail2ban Konfiguration und sslh konfiguration
Alt 28.08.2012, 23:47   # 3
F4nta
Master of supply
rot rot rot rot 
Bewertung:
F4nta hat 500 bis 999 PunkteF4nta hat 500 bis 999 PunkteF4nta hat 500 bis 999 PunkteF4nta hat 500 bis 999 PunkteF4nta hat 500 bis 999 PunkteF4nta hat 500 bis 999 Punkte
Registriert seit: Aug 2005
Internet: DSL2 32K
Beiträge: 1.408
Power: 27
logfiles vom sendmail wären toll (wenns daran scheitert!)
  F4nta ist offline  

AW: CentOs x64 Fail2ban Konfiguration und sslh konfiguration
Alt 29.08.2012, 07:16   # 4
Excelsus
Kabel Wurm
rot rot rot 
Bewertung:
Excelsus 200k+ Inflation
Registriert seit: May 2007
Internet: Modem/ISDN
Beiträge: 1.001
Power: 58
Themenstarter
Hi danke für die Rückmeldung, aber das Thema ist schon fast 3 Monate alt. Ich habs dann mal selbst gelöst irgendwie :-D

BW haste aber!

Closed!

Meist belehrt erst der Verlust über den Wert der Dinge.
Zeig mir einen Platz zum verweilen und ich werde die Welt bewegen!
  Excelsus ist offline  
Thema geschlossen

RR:Board > Computer > Linux & BSD > CentOs x64 Fail2ban Konfiguration und sslh konfiguration


Forumregeln
Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir erlaubt, Anhänge anzufügen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

vB Code ist An.
Smileys sind An.
[IMG] Code ist An.
HTML-Code ist Aus.

Ähnliche Themen
Thema Autor Forum Antworten Letzter Beitrag
CentOS 6.2 x64 Load Average durchgehend höher als 0.10 Excelsus Linux & BSD 1 13.06.2012 20:23
HTPC Konfiguration Metzelbude PC Hardware 0 20.10.2010 12:28
[Windows 7] - richtige Konfiguration von Partitionen und Benutzerkonten _zippo^ Windows 6 19.03.2010 00:39
Soundrechner Konfiguration =) BlackDeath Kaufberatung 2 24.02.2010 15:20
[Hacking] - RAT Tarnung und Konfiguration [TuT] acid_burn Security Tutorials 0 07.10.2007 14:19



Alle Zeitangaben in WEZ +1. Es ist jetzt 14:21 Uhr.
vBulletin Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.