Hello. Ubuntu 16.04.5 contains only 0.9.3 and I don't know how to upgrade fail2ban to 0.10 with ipv6 support without any bugs and repositary changes. https://packages.ubuntu.com/xenial/fail2ban
Please help.
As correct noted in #2148 and others:
Distro package maintainers are responsible for distro packaging.
You may try to find some repository (e. g. neurodebian, launchpad, etc) that contains fail2ban could be installed on Ubuntu (16.04).
No idea which best repo it could be (just google).
The way for manual installation is described on the README, Installation section as well as in the wiki (e. g. How to test newer fail2ban version resp. use fail2ban standalone instance).
Although the default version is debian-friendly, it may not have your distro-specified configs/paths (and services), so:
That's it.
Here's a step by step of what I did to make this work:
# REMOVE FAIL2BAN COMPLETELY AND BACKUP EXISTING INSTALL
service fail2ban stop
cp -a /etc/fail2ban/ /etc/fail2ban_backup/
apt-get remove --auto-remove fail2ban
apt-get purge --auto-remove fail2ban
rm -r /etc/fail2ban/
# DOWNLOAD NEWER RELEASE AND INSTALL MANUALLY
wget https://github.com/fail2ban/fail2ban/archive/0.10.4.tar.gz
tar xzf 0.10.4.tar.gz
cd fail2ban-0.10.4/
python setup.py install
# PUT UBUNTU SPECIFIC FILES INTO PLACE
cp files/bash-completion /etc/bash_completion.d/fail2ban
cp man/*.5 /usr/share/man/man5
cp man/*.1 /usr/share/man/man1
wget -O /etc/logrotate.d/fail2ban https://raw.githubusercontent.com/fail2ban/fail2ban/debian/debian/fail2ban.logrotate
cp build/fail2ban.service /lib/systemd/system/fail2ban.service
systemctl enable fail2ban
service rsyslog restart
service fail2ban start
service fail2ban status
Now enable some jails or copy rules from your old jail.local or jail.conf files and you should be in business.
Most helpful comment
Here's a step by step of what I did to make this work:
Now enable some jails or copy rules from your old jail.local or jail.conf files and you should be in business.