Issue while installing Fail2Ban


New Member
Aug 12, 2023

i´ve installed ProxMox 7.4-16 and i´ve tried to setup Fail2Ban according to

when i run the test Command i get this error:
~ # fail2ban-regex /var/log/daemon.log /etc/fail2ban/filter.d/proxmox.conf

Running tests


Use   failregex filter file : proxmox, basedir: /etc/fail2ban

Use         log file : /var/log/daemon.log

Use         encoding : UTF-8

Traceback (most recent call last):

  File "/usr/bin/fail2ban-regex", line 34, in <module>


  File "/usr/lib/python3/dist-packages/fail2ban/client/", line 836, in exec_command_line

    if not fail2banRegex.start(args):

  File "/usr/lib/python3/dist-packages/fail2ban/client/", line 776, in start


  File "/usr/lib/python3/dist-packages/fail2ban/client/", line 584, in process

    line_datetimestripped, ret, is_ignored = self.testRegex(line)

  File "/usr/lib/python3/dist-packages/fail2ban/client/", line 456, in testRegex

    found = self._filter.processLine(line, date)

  File "/usr/lib/python3/dist-packages/fail2ban/server/", line 613, in processLine

    timeMatch = self.dateDetector.matchTime(line)

  File "/usr/lib/python3/dist-packages/fail2ban/server/", line 368, in matchTime

    (line[distance] == self.__lastPos[2] and not self.__lastPos[2].isalnum())

IndexError: string index out of range

Do you have anything to sugest?

This is not a PVE related issue. A quick internet search indicates that this may be due to a formatting of the log, specifically date format in it.
I would recommend reviewing existing articles online that refer to the this error message, reviewing the log file and may be trying a smaller log sample to determine the lines that cause the issue.
After that, if you think fail2ban is not working as it should, you can open a bug with that team. Similar to this:

good luck

Blockbridge : Ultra low latency all-NVME shared storage for Proxmox -


The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!