How to Install and Uninstall fail2ban Package on Ubuntu 21.04 (Hirsute Hippo)

Last updated: May 11,2024

1. Install "fail2ban" package

In this section, we are going to explain the necessary steps to install fail2ban on Ubuntu 21.04 (Hirsute Hippo)

$ sudo apt update $ sudo apt install fail2ban

2. Uninstall "fail2ban" package

Please follow the instructions below to uninstall fail2ban on Ubuntu 21.04 (Hirsute Hippo):

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

3. Information about the fail2ban package on Ubuntu 21.04 (Hirsute Hippo)

Package: fail2ban
Architecture: all
Version: 0.11.2-1
Priority: optional
Section: universe/net
Origin: Ubuntu
Maintainer: Ubuntu Developers
Original-Maintainer: Debian Python Team
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 2046
Depends: python3:any, lsb-base (>= 2.0-7)
Recommends: nftables | iptables, whois, python3-pyinotify, python3-systemd
Suggests: mailx, system-log-daemon, monit, sqlite3
Filename: pool/universe/f/fail2ban/fail2ban_0.11.2-1_all.deb
Size: 387216
MD5sum: 522e749097f673e2f813d27452087605
SHA1: c5a488613293cd2867a2913c1ba2c5bf9add7f1a
SHA256: 11ebf3cda28e79548a5cf4863c8127ca199e27ee2d727b742f6326963a413c1c
SHA512: 4c91380b98a4490132c7225cdd33d6ed6078423e2e043a255f61128bd9dfe0e10682e58e773de6ed656ab93f40c3e064c2b5f5102a4b9a0d620a0cad8fdf026f
Homepage: https://www.fail2ban.org
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, 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/nftables -- default installation uses iptables for banning.
nftables is also supported. 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: 2aaeac0c71609eb6bfd4102c0adc7275