How to Install and Uninstall fail2ban Package on Ubuntu 16.04 LTS (Xenial Xerus)

Last updated: May 14,2024

1. Install "fail2ban" package

This guide let you learn how to install fail2ban on Ubuntu 16.04 LTS (Xenial Xerus)

$ sudo apt update $ sudo apt install fail2ban

2. Uninstall "fail2ban" package

Please follow the steps below to uninstall fail2ban on Ubuntu 16.04 LTS (Xenial Xerus):

$ sudo apt remove fail2ban $ sudo apt autoclean && sudo apt autoremove

3. Information about the fail2ban package on Ubuntu 16.04 LTS (Xenial Xerus)

Package: fail2ban
Priority: optional
Section: universe/net
Installed-Size: 1152
Maintainer: Ubuntu Developers
Original-Maintainer: Yaroslav Halchenko
Architecture: all
Version: 0.9.3-1
Depends: python3, python3:any (>= 3.3.2-2~), init-system-helpers (>= 1.18~), lsb-base (>= 2.0-7)
Recommends: python, iptables, whois, python3-pyinotify, python3-systemd
Suggests: mailx, system-log-daemon, monit
Filename: pool/universe/f/fail2ban/fail2ban_0.9.3-1_all.deb
Size: 227028
MD5sum: d4eedccf04345c9f642391f7adcecb86
SHA1: 5036d57b893c077059edaa930b763bbc5f180f05
SHA256: 77956ae0e2809bbbb6e76f7e228a3b453a4a8dd9f005e812bacd708714dddb8c
Description-en: ban hosts that cause multiple authentication errors
Fail2ban monitors log files (e.g. /var/log/auth.log,
/var/log/apache/access.log) and temporarily or persistently bans
failure-prone addresses by updating existing firewall rules. Fail2ban
allows easy specification of different actions to be taken such as to ban
an IP using iptables or hostsdeny rules, or simply to send a notification
email.
.
By default, it comes with filter expressions for various services
(sshd, apache, qmail, proftpd, sasl etc.) but configuration can be
easily extended for monitoring any other text file. All filters and
actions are given in the config files, thus fail2ban can be adopted
to be used with a variety of files and firewalls. Following recommends
are listed:
.
- iptables -- default installation uses iptables for banning. You most
probably need it
- whois -- used by a number of *mail-whois* actions to send notification
emails with whois information about attacker hosts. Unless you will use
those you don't need whois
- python3-pyinotify -- unless you monitor services logs via systemd, you
need pyinotify for efficient monitoring for log files changes
Description-md5: 95d3181b6813e8ad44755ae80b3619f9
Homepage: http://www.fail2ban.org
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu