Silicon's blog

Menu
  • Home
  • Kadena
  • Solana
  • Ethereum
  • Bot Automation
  • Proxmox
  • Nginx Proxy Manager
  • Others
  • Contact
Menu

Install fail2ban on Proxmox 7 (7.0-11)

Posted on June 6, 2022May 17, 2023 by Silicon
Sharing is Caring:
Twitter 0
Copy 0

 

This article is based on a post from the Proxmox forum:

https://forum.proxmox.com/threads/pmg-7-debian-11-with-fail2ban.96109/

Step 1: Update the list of available packages & install the Fail2ban package

apt-get update
apt-get install fail2ban

Step 2: Edit the Fail2ban settings

nano /etc/fail2ban/jail.d/pmg-web-auth.conf
[pmg-web-auth]
enabled = true
port = 8006
filter = pmg-web-auth
logpath = /var/log/daemon.log
maxretry = 5
# 1 hour
bantime = 3600

Step 3: Edit the Fail2ban filter. The filter is the updated one and has slightly different from the original post

nano /etc/fail2ban/filter.d/pmg-web-auth.conf
[Definition]
failregex = pvedaemon\[.*authentication failure; rhost=<HOST> user=.* msg=.*
ignoreregex =

Step 4: Restart the Fail2ban service using the new settings

systemctl restart fail2ban

You can check the Fail2ban’s jail status with this command

fail2ban-client status pmg-web-auth

Leave a Reply Cancel reply


The reCAPTCHA verification period has expired. Please reload the page.

©2024 Silicon's blog
Click to Copy