Skip to content

Instantly share code, notes, and snippets.

@donilan
Created August 4, 2016 16:30
Show Gist options
  • Select an option

  • Save donilan/b4c425dfde552fe18897054865dbe170 to your computer and use it in GitHub Desktop.

Select an option

Save donilan/b4c425dfde552fe18897054865dbe170 to your computer and use it in GitHub Desktop.
/etc/fail2ban/jail.local
[DEFAULT]
# "ignoreip" can be an IP address, a CIDR mask or a DNS host. Fail2ban will not
# ban a host which matches an address in this list. Several addresses can be
# defined using space separator.
ignoreip = 127.0.0.1
# "bantime" is the number of seconds that a host is banned.
bantime = 3600
# A host is banned if it has generated "maxretry" during the last "findtime"
# seconds.
findtime = 600
# "maxretry" is the number of failures before a host get banned.
maxretry = 3
[ssh-iptables]
enabled = true
filter = sshd
action = iptables[name=SSH, port=ssh, protocol=tcp]
sendmail-whois[name=SSH, dest=root, [email protected]]
logpath = /var/log/secure
maxretry = 5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment