Ensure fail2ban and logrotate are available on all machines

This commit is contained in:
Jake Howard
2020-12-27 22:39:33 +00:00
parent b11dbfc829
commit 58879d2e1d
8 changed files with 69 additions and 6 deletions

View File

@ -0,0 +1,11 @@
/var/log/fail2ban.log {
weekly
rotate 7
missingok
compress
nodateext
notifempty
postrotate
/usr/bin/fail2ban-client flushlogs 1>/dev/null || true
endscript
}

View File

@ -0,0 +1,7 @@
[sshd]
enabled = true
bantime = 600
findtime = 30
maxretry = 5
port = {{ ssh_port }},ssh
ignoreip = {{ wireguard.cidr }}

View File

@ -1,6 +1,6 @@
# TCP port to bind to
# Change to a high/odd port if this server is exposed to the internet directly
Port 7743
Port {{ ssh_port }}
{% if expose_ssh %}
AllowUsers {{ user }}