apt-get install fail2ban
[DEFAULT] # "ignoreip" can be an IP address, a CIDR mask or a DNS host ignoreip = 127.0.0.1/8 192.168.0.0/16 # "bantime" is the number of seconds that a host is banned. # 86400 s = 1 day bantime = 86400 ... # A host is banned if it has generated "maxretry" during the last "findtime" # seconds. # 604800 s = 7 days findtime = 604800 maxretry = 10 ... destemail = foo@bar.com ... # Choose default action. To change, just override value of 'action' with the # interpolation to the chosen action shortcut (e.g. action_mw, action_mwl, etc) in jail.local # globally (section [DEFAULT]) or per specific section action = %(action_)s ... # majd a fájl többi részén a szolgáltatások engedélyezése / tiltása
ssh
ssh-ddos
apache
apache-overflows
postfix
dovecot
service fail2ban restart
ln -s /usr/share/munin/plugins/fail2ban /etc/munin/plugins/ echo -n " [fail2ban] user root " >> /etc/munin/plugin-conf.d/munin-node
munin-run fail2ban
service munin-node restart
fail2ban-client status fail2ban-client status mail fail2ban-client status dovecot
fail2ban-regex /var/log/mail.log /etc/fail2ban/filter.d/postfix.conf