PMG 7/Debian 11 with fail2ban

apt-get install fail2ban -y

nano /etc/fail2ban/jail.d/defaults-debian.conf

[DEFAULT]
banaction = nftables-multiport
banaction_allports = nftables-allports

nano /etc/fail2ban/jail.d/pmg-web-auth.conf

[pmg-web-auth]
enabled = true
port = https,http,8006
filter = pmg-web-auth
logpath = /var/log/daemon.log
maxretry = 2
# 1 hour
bantime = 3600

nano /etc/fail2ban/filter.d/pmg-web-auth.conf

[Definition]
failregex = pmgdaemon\[.*authentication failure; rhost=<HOST> user=.* msg=.*
ignoreregex =
systemctl restart fail2ban
systemctl enable fail2ban
fail2ban-client status pmg-web-auth
systemctl status fail2ban
fail2ban-regex /var/log/daemon.log /etc/fail2ban/filter.d/pmg-web-auth.conf