Skip to content

Commit

Permalink
make sure ufw.log always exists for fail2ban (#937)
Browse files Browse the repository at this point in the history
* make sure ufw.log always exists for fail2ban
  • Loading branch information
dhiltonp authored and nachoparker committed Sep 5, 2019
1 parent bf30c4f commit 954366e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bin/ncp/SECURITY/fail2ban.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,12 @@ 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
}
Expand Down

0 comments on commit 954366e

Please sign in to comment.