Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/nextcloudpi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Hilton <david.hilton.p@gmail.com>2019-08-19 00:51:04 +0300
committernachoparker <nacho@ownyourbits.com>2019-09-05 22:19:32 +0300
commit954366ef75471b70aef5dda1246a2c9a42e69927 (patch)
treece8eccc4896de82e38fb6e6fc5ad4452c76f162e
parentbf30c4febdb0493ce1960bb9ee552a3d5a9f102b (diff)
make sure ufw.log always exists for fail2ban (#937)v1.15.5
* make sure ufw.log always exists for fail2ban
-rw-r--r--bin/ncp/SECURITY/fail2ban.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/bin/ncp/SECURITY/fail2ban.sh b/bin/ncp/SECURITY/fail2ban.sh
index 2e47031a..fbe4fec7 100644
--- a/bin/ncp/SECURITY/fail2ban.sh
+++ b/bin/ncp/SECURITY/fail2ban.sh
@@ -52,9 +52,13 @@ EOF
[INCLUDES]
before = common.conf
[Definition]
-failregex = UFW BLOCK.* SRC=
+failregex = UFW BLOCK.* SRC=<HOST>
ignoreregex =
EOF
+ cat > /etc/systemd/system/fail2ban.service.d/touch-ufw-log.conf <<EOF
+[Service]
+ExecStartPre=/bin/touch /var/log/ufw.log
+EOF
chmod +x /etc/services-available.d/100fail2ban
}