Skip to content

Instantly share code, notes, and snippets.

@tuklusan
Last active October 21, 2016 15:25
Show Gist options
  • Save tuklusan/60a603dec6fe61cb3f6aab9675c01ccd to your computer and use it in GitHub Desktop.
Save tuklusan/60a603dec6fe61cb3f6aab9675c01ccd to your computer and use it in GitHub Desktop.
Fail2Ban Intrusion Prevention on Solaris 11 OPENINDIANA SunOS 5.11 Illumos with Reporting to Blocklist.de: http://supratim-sanyal.blogspot.com/2016/09/fail2ban-intrusion-prevention-on.html
# /etc/fail2ban/action.d/mail-whois-lines.local
# solaris 11 openindiana
# See http://supratim-sanyal.blogspot.com/2016/09/fail2ban-intrusion-prevention-on.html for details
[Definition]
actionban = printf %%b "Hi,\n
The IP <ip> has just been banned by Fail2Ban after <failures> attempts against <name>.\n
Lines containing IP:<ip> in <logpath>\n
`/usr/gnu/bin/grep <grepopts> <ip> <logpath>`\n
Here is more information about <ip> :\n
`%(_whois_command)s`\n
Regards,\n
Fail2Ban"|mailx -s "[Fail2Ban] <name>: <ip> banned on `uname -n`" -r "<sendername><<sender>>" <dest>
[Init]
logpath = /var/adm/auth.log
grepopts = -m 1000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment