From 4dbdf09dc98cb3bd624741a14713feceee4006b5 Mon Sep 17 00:00:00 2001 From: Christoph Date: Mon, 27 Nov 2017 04:23:54 +0100 Subject: [PATCH] Initial commit --- 0.10.2/README.install | 7 + 0.10.2/action.d/helpers-common.conf | 16 ++ 0.10.2/action.d/iptables-multiport.local | 27 ++++ 0.10.2/action.d/sendmail-ban-unban.local | 70 +++++++++ 0.10.2/action.d/sendmail-ban.local | 63 ++++++++ 0.10.2/action.d/sendmail-whois-lines.local | 46 ++++++ 0.10.2/filter.d/dovecot.local | 7 + 0.10.2/filter.d/postfix.local | 5 + 0.10.2/ip64tables | 29 ++++ 0.10.2/jail.local | 105 +++++++++++++ 0.8.6/action.d/firewallcmd-ipset.local | 67 ++++++++ 0.8.6/action.d/firewallcmd-new.local | 72 +++++++++ 0.8.6/action.d/ip64tables-multiport-log.local | 83 ++++++++++ 0.8.6/action.d/iptables-allports.local | 70 +++++++++ 0.8.6/action.d/iptables-ipset-proto4.local | 73 +++++++++ .../iptables-ipset-proto6-allports.local | 64 ++++++++ 0.8.6/action.d/iptables-ipset-proto6.local | 76 +++++++++ 0.8.6/action.d/iptables-multiport-log.local | 83 ++++++++++ 0.8.6/action.d/iptables-multiport.local | 73 +++++++++ 0.8.6/action.d/iptables-new.local | 76 +++++++++ 0.8.6/action.d/iptables-xt_recent-echo.local | 77 ++++++++++ 0.8.6/action.d/iptables.local | 73 +++++++++ 0.8.6/action.d/sendmail-only-ban.local | 69 +++++++++ 0.8.6/action.d/sendmail-only-ban_unban.local | 76 +++++++++ 0.8.6/filter.d/apache-badbots.local | 22 +++ 0.8.6/filter.d/http-dos.local | 3 + 0.8.6/filter.d/owncloud.local | 2 + 0.8.6/filter.d/postfix-auth-dos.local | 23 +++ 0.8.6/filter.d/postfix-sasl.local | 14 ++ 0.8.6/filter.d/sshd.local | 44 ++++++ 0.8.6/filter.d/wp-login.local | 14 ++ 0.8.6/filter.d/wp-xmlrpc.local | 3 + 0.8.6/ip64tables | 29 ++++ 0.8.6/jail.local | 144 ++++++++++++++++++ 0.9.6/action.d/ip64tables-allports.local | 54 +++++++ 0.9.6/action.d/ip64tables-common.local | 62 ++++++++ 0.9.6/action.d/ip64tables-multiport.local | 51 +++++++ 0.9.6/action.d/sendmail-only-ban.local | 75 +++++++++ 0.9.6/action.d/sendmail-only-ban_unban.local | 82 ++++++++++ 0.9.6/filter.d/dovecot-pop3imap.local | 3 + 0.9.6/ip64tables | 29 ++++ 0.9.6/jail.local | 62 ++++++++ 42 files changed, 2123 insertions(+) create mode 100644 0.10.2/README.install create mode 100644 0.10.2/action.d/helpers-common.conf create mode 100644 0.10.2/action.d/iptables-multiport.local create mode 100644 0.10.2/action.d/sendmail-ban-unban.local create mode 100644 0.10.2/action.d/sendmail-ban.local create mode 100644 0.10.2/action.d/sendmail-whois-lines.local create mode 100644 0.10.2/filter.d/dovecot.local create mode 100644 0.10.2/filter.d/postfix.local create mode 100755 0.10.2/ip64tables create mode 100644 0.10.2/jail.local create mode 100644 0.8.6/action.d/firewallcmd-ipset.local create mode 100644 0.8.6/action.d/firewallcmd-new.local create mode 100644 0.8.6/action.d/ip64tables-multiport-log.local create mode 100644 0.8.6/action.d/iptables-allports.local create mode 100644 0.8.6/action.d/iptables-ipset-proto4.local create mode 100644 0.8.6/action.d/iptables-ipset-proto6-allports.local create mode 100644 0.8.6/action.d/iptables-ipset-proto6.local create mode 100644 0.8.6/action.d/iptables-multiport-log.local create mode 100644 0.8.6/action.d/iptables-multiport.local create mode 100644 0.8.6/action.d/iptables-new.local create mode 100644 0.8.6/action.d/iptables-xt_recent-echo.local create mode 100644 0.8.6/action.d/iptables.local create mode 100644 0.8.6/action.d/sendmail-only-ban.local create mode 100644 0.8.6/action.d/sendmail-only-ban_unban.local create mode 100644 0.8.6/filter.d/apache-badbots.local create mode 100644 0.8.6/filter.d/http-dos.local create mode 100644 0.8.6/filter.d/owncloud.local create mode 100644 0.8.6/filter.d/postfix-auth-dos.local create mode 100644 0.8.6/filter.d/postfix-sasl.local create mode 100644 0.8.6/filter.d/sshd.local create mode 100644 0.8.6/filter.d/wp-login.local create mode 100644 0.8.6/filter.d/wp-xmlrpc.local create mode 100755 0.8.6/ip64tables create mode 100644 0.8.6/jail.local create mode 100644 0.9.6/action.d/ip64tables-allports.local create mode 100644 0.9.6/action.d/ip64tables-common.local create mode 100644 0.9.6/action.d/ip64tables-multiport.local create mode 100644 0.9.6/action.d/sendmail-only-ban.local create mode 100644 0.9.6/action.d/sendmail-only-ban_unban.local create mode 100644 0.9.6/filter.d/dovecot-pop3imap.local create mode 100755 0.9.6/ip64tables create mode 100644 0.9.6/jail.local diff --git a/0.10.2/README.install b/0.10.2/README.install new file mode 100644 index 0000000..95e436e --- /dev/null +++ b/0.10.2/README.install @@ -0,0 +1,7 @@ + +echo "deb tor+http://ncomputers.org/debian stretch main" > /etc/apt/sources.list.d/ncomputers.org-stretch.list +echo "deb http://ncomputers.org/debian stretch main" > /etc/apt/sources.list.d/ncomputers.org-stretch.list +apt-get update +apt-get install ncomputers.org-keyring +apt-get update + diff --git a/0.10.2/action.d/helpers-common.conf b/0.10.2/action.d/helpers-common.conf new file mode 100644 index 0000000..b036f68 --- /dev/null +++ b/0.10.2/action.d/helpers-common.conf @@ -0,0 +1,16 @@ +[DEFAULT] + +# Usage: +# _grep_logs_args = 'test' +# (printf %%b "Log-excerpt contains 'test':\n"; %(_grep_logs)s; printf %%b "Log-excerpt contains 'test':\n") | mail ... +# +_grep_logs = logpath=""; grep -E %(_grep_logs_args)s $logpath | +_grep_logs_args = "(^|[^0-9a-fA-F:])$(echo '' | sed 's/\./\\./g')([^0-9a-fA-F:]|$)" + +# Used for actions, that should not by executed if ticket was restored: +_bypass_if_restored = if [ '' = '1' ]; then exit 0; fi; + +[Init] +greplimit = tail -n +grepmax = 1000 +grepopts = -m diff --git a/0.10.2/action.d/iptables-multiport.local b/0.10.2/action.d/iptables-multiport.local new file mode 100644 index 0000000..a7a1c6c --- /dev/null +++ b/0.10.2/action.d/iptables-multiport.local @@ -0,0 +1,27 @@ +# Fail2Ban configuration file +# +# Author: Cyril Jaquier +# Modified by Yaroslav Halchenko for multiport banning +# + +[Definition] + +# Option: actionstart +# Notes.: command executed once at the start of Fail2Ban. +# Values: CMD +# +actionstart = -N f2b- + -A f2b- -j + -I -p -m multiport --dports -j f2b- + +# Option: actionstop +# Notes.: command executed once at the end of Fail2Ban +# Values: CMD +# +actionstop = -D -p -m multiport --dports -j f2b- + + -X f2b- + +[Init] + +ip64tables = ip64tables diff --git a/0.10.2/action.d/sendmail-ban-unban.local b/0.10.2/action.d/sendmail-ban-unban.local new file mode 100644 index 0000000..22421ce --- /dev/null +++ b/0.10.2/action.d/sendmail-ban-unban.local @@ -0,0 +1,70 @@ +# Fail2Ban configuration file +# +# Author: Cyril Jaquier +# +# $Revision$ +# +[INCLUDES] + + + +[Definition] + +# Option: actionstart +# Notes.: command executed once at the start of Fail2Ban. +# Values: CMD +# +actionstart = + +# Option: actionstop +# Notes.: command executed once at the end of Fail2Ban +# Values: CMD +# +actionstop = + +# Option: actioncheck +# Notes.: command executed once before each actionban command +# Values: CMD +# +actioncheck = + +# Option: actionban +# Notes.: command executed when banning an IP. Take care that the +# command is executed with Fail2Ban user rights. +# Tags: IP address +# number of failures +#