From 7b6b0f63f56712a33118d0540f075c1a38a66ada Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Tue, 28 May 2019 06:29:58 +0200 Subject: [PATCH] daily autocommit --- .etckeeper | 2 + iptables/rules.v4 | 64 +------------------ iptables/rules.v6 | 6 +- .../system/fail2ban.service.d/netfilter.conf | 5 ++ 4 files changed, 13 insertions(+), 64 deletions(-) create mode 100644 systemd/system/fail2ban.service.d/netfilter.conf diff --git a/.etckeeper b/.etckeeper index d6b25f5..e633c63 100755 --- a/.etckeeper +++ b/.etckeeper @@ -1566,6 +1566,8 @@ maybe chmod 0644 'systemd/resolved.conf' maybe chmod 0755 'systemd/system' maybe chmod 0644 'systemd/system.conf' maybe chmod 0755 'systemd/system/default.target.wants' +maybe chmod 0755 'systemd/system/fail2ban.service.d' +maybe chmod 0644 'systemd/system/fail2ban.service.d/netfilter.conf' maybe chmod 0755 'systemd/system/getty.target.wants' maybe chmod 0755 'systemd/system/getty@.service.d' maybe chmod 0644 'systemd/system/getty@.service.d/noclear.conf' diff --git a/iptables/rules.v4 b/iptables/rules.v4 index 1b315b0..a9c33b3 100644 --- a/iptables/rules.v4 +++ b/iptables/rules.v4 @@ -1,27 +1,11 @@ -# Generated by iptables-save v1.6.0 on Wed Feb 20 21:38:32 2019 +# Generated by iptables-save v1.6.0 on Mon May 27 11:33:34 2019 *filter :INPUT ACCEPT [0:0] :FORWARD ACCEPT [0:0] -:OUTPUT ACCEPT [33:10731] -:f2b-apache - [0:0] -:f2b-apache-modsecurity - [0:0] -:f2b-apache-nohome - [0:0] -:f2b-apache-noscript - [0:0] -:f2b-apache-overflows - [0:0] -:f2b-postfix - [0:0] -:f2b-ssh - [0:0] -:f2b-sshd - [0:0] +:OUTPUT ACCEPT [205:52521] :icinga2 - [0:0] :rejects - [0:0] :salt-master - [0:0] --A INPUT -p tcp -m multiport --dports 22 -j f2b-ssh --A INPUT -p tcp -m multiport --dports 25,465,587 -j f2b-postfix --A INPUT -p tcp -m multiport --dports 0:65535 -j f2b-sshd --A INPUT -p tcp -m multiport --dports 80,443 -j f2b-apache-nohome --A INPUT -p tcp -m multiport --dports 80,443 -j f2b-apache-modsecurity --A INPUT -p tcp -m multiport --dports 80,443 -j f2b-apache-overflows --A INPUT -p tcp -m multiport --dports 80,443 -j f2b-apache-noscript --A INPUT -p tcp -m multiport --dports 80,443 -j f2b-apache -A INPUT -s 220.192.0.0/12 -p tcp -m multiport --dports 22 -j REJECT --reject-with icmp-port-unreachable -A INPUT -s 222.184.0.0/13 -p tcp -m multiport --dports 22 -j REJECT --reject-with icmp-port-unreachable -A INPUT -m conntrack --ctstate ESTABLISHED -j ACCEPT @@ -41,48 +25,6 @@ -A INPUT -j rejects -A INPUT -j NFLOG --nflog-prefix "IPv4 INPUT Reject " --nflog-threshold 1 -A INPUT -j REJECT --reject-with icmp-port-unreachable --A f2b-apache -j RETURN --A f2b-apache -j RETURN --A f2b-apache -j RETURN --A f2b-apache -j RETURN --A f2b-apache -j RETURN --A f2b-apache-modsecurity -j RETURN --A f2b-apache-modsecurity -j RETURN --A f2b-apache-modsecurity -j RETURN --A f2b-apache-modsecurity -j RETURN --A f2b-apache-modsecurity -j RETURN --A f2b-apache-nohome -j RETURN --A f2b-apache-nohome -j RETURN --A f2b-apache-nohome -j RETURN --A f2b-apache-nohome -j RETURN --A f2b-apache-nohome -j RETURN --A f2b-apache-noscript -j RETURN --A f2b-apache-noscript -j RETURN --A f2b-apache-noscript -j RETURN --A f2b-apache-noscript -j RETURN --A f2b-apache-noscript -j RETURN --A f2b-apache-overflows -j RETURN --A f2b-apache-overflows -j RETURN --A f2b-apache-overflows -j RETURN --A f2b-apache-overflows -j RETURN --A f2b-apache-overflows -j RETURN --A f2b-postfix -j RETURN --A f2b-postfix -j RETURN --A f2b-postfix -j RETURN --A f2b-postfix -j RETURN --A f2b-postfix -j RETURN --A f2b-ssh -s 51.38.90.195/32 -j REJECT --reject-with icmp-port-unreachable --A f2b-ssh -s 58.242.83.8/32 -j REJECT --reject-with icmp-port-unreachable --A f2b-ssh -j RETURN --A f2b-ssh -j RETURN --A f2b-ssh -j RETURN --A f2b-ssh -j RETURN --A f2b-ssh -j RETURN --A f2b-sshd -j RETURN --A f2b-sshd -j RETURN --A f2b-sshd -j RETURN --A f2b-sshd -j RETURN --A f2b-sshd -j RETURN -A icinga2 -s 185.102.95.107/32 -j ACCEPT -A icinga2 -s 162.254.24.33/32 -j ACCEPT -A icinga2 -s 185.48.118.128/32 -j ACCEPT @@ -110,4 +52,4 @@ -A salt-master -j NFLOG --nflog-prefix "IPv4 Salt Reject " --nflog-threshold 1 -A salt-master -j REJECT --reject-with icmp-port-unreachable COMMIT -# Completed on Wed Feb 20 21:38:32 2019 +# Completed on Mon May 27 11:33:34 2019 diff --git a/iptables/rules.v6 b/iptables/rules.v6 index fbe36cd..5ff5228 100644 --- a/iptables/rules.v6 +++ b/iptables/rules.v6 @@ -1,8 +1,8 @@ -# Generated by ip6tables-save v1.6.0 on Wed Feb 20 21:38:32 2019 +# Generated by ip6tables-save v1.6.0 on Mon May 27 11:33:34 2019 *filter :INPUT ACCEPT [0:0] :FORWARD ACCEPT [0:0] -:OUTPUT ACCEPT [374:31098] +:OUTPUT ACCEPT [581196:84012433] :salt-master - [0:0] -A INPUT -m conntrack --ctstate ESTABLISHED -j ACCEPT -A INPUT -m conntrack --ctstate RELATED -j ACCEPT @@ -29,4 +29,4 @@ -A salt-master -j NFLOG --nflog-prefix "IPv6 Salt Reject " --nflog-threshold 1 -A salt-master -j REJECT --reject-with icmp6-port-unreachable COMMIT -# Completed on Wed Feb 20 21:38:32 2019 +# Completed on Mon May 27 11:33:34 2019 diff --git a/systemd/system/fail2ban.service.d/netfilter.conf b/systemd/system/fail2ban.service.d/netfilter.conf new file mode 100644 index 0000000..be0fa83 --- /dev/null +++ b/systemd/system/fail2ban.service.d/netfilter.conf @@ -0,0 +1,5 @@ +[Unit] +After=netfilter-persistent.service +PartOf=netfilter-persistent.service + +# vim: syntax=systemd -- 2.39.5