How To Install sshguard on Fedora 36
Introduction
In this tutorial we learn how to install sshguard
on Fedora 36.
What is sshguard
Sshguard protects hosts from brute-force attacks against SSH and other services. It aggregates system logs and blocks repeat offenders using one of several firewall backends. Sshguard can read log messages from standard input or monitor one or more log files. Log messages are parsed, line-by-line, for recognized patterns. If an attack, such as several login failures within a few seconds, is detected, the offending IP is blocked. Offenders are unblocked after a set interval, but can be semi-permanently banned using the blacklist option.
We can use yum
or dnf
to install sshguard
on Fedora 36. In this tutorial we discuss both methods but you only need to choose one of method to install sshguard.
Install sshguard on Fedora 36 Using dnf
Update yum database with dnf
using the following command.
sudo dnf makecache --refresh
After updating yum database, We can install sshguard
using dnf
by running the following command:
sudo dnf -y install sshguard
Install sshguard on Fedora 36 Using yum
Update yum database with yum
using the following command.
sudo yum makecache --refresh
After updating yum database, We can install sshguard
using yum
by running the following command:
sudo yum -y install sshguard
How To Uninstall sshguard on Fedora 36
To uninstall only the sshguard
package we can use the following command:
sudo dnf remove sshguard
sshguard Package Contents on Fedora 36
/etc/sshguard.whitelist
/usr/lib/.build-id
/usr/lib/.build-id/34
/usr/lib/.build-id/34/e9f64fb96075dbf6b7adf47842b82a29f71786
/usr/lib/.build-id/39
/usr/lib/.build-id/39/08e6b0c9ad463e4da015ccac963d68caf30bcf
/usr/lib/.build-id/c8
/usr/lib/.build-id/c8/c0d8e583629a5d6a0a1dbb97d0e9176b071e78
/usr/lib/systemd/system/sshguard.service
/usr/libexec/sshguard
/usr/libexec/sshguard/sshg-blocker
/usr/libexec/sshguard/sshg-fw-firewalld
/usr/libexec/sshguard/sshg-fw-hosts
/usr/libexec/sshguard/sshg-fw-ipfilter
/usr/libexec/sshguard/sshg-fw-ipfw
/usr/libexec/sshguard/sshg-fw-ipset
/usr/libexec/sshguard/sshg-fw-iptables
/usr/libexec/sshguard/sshg-fw-nft-sets
/usr/libexec/sshguard/sshg-fw-null
/usr/libexec/sshguard/sshg-fw-pf
/usr/libexec/sshguard/sshg-logtail
/usr/libexec/sshguard/sshg-parser
/usr/sbin/sshguard
/usr/share/doc/sshguard
/usr/share/doc/sshguard/CONTRIBUTING.rst
/usr/share/doc/sshguard/README.rst
/usr/share/doc/sshguard/examples
/usr/share/doc/sshguard/examples/sshguard.conf.sample
/usr/share/doc/sshguard/examples/whitelistfile.example
/usr/share/licenses/sshguard
/usr/share/licenses/sshguard/COPYING
/usr/share/man/man7/sshguard-setup.7.gz
/usr/share/man/man8/sshguard.8.gz
/var/lib/sshguard
References
Summary
In this tutorial we learn how to install sshguard
on Fedora 36 using yum and [dnf]((/fedora/36/dnf/).