Install GNU Stow to keep track of built-from-source-code applications using system default repository:
sudo dnf install stow
We install the following dependencies required for building sshguard application:
sudo dnf install byacc flex gcc make
We proceed to download sshguard 2.4.0 from sourceforge.net.
We can then extract to default home location /home/username.
Using terminal/console, set the location to the extracted folder using cd command:
cd sshguard-2.4.0/
We proceed to build the sshguard using source makefile by running configure with installation location set at /usr/local/stow/sshguard and make command:
./configure --prefix=/usr/local/stow/sshguard
make
We proceed to install the sshguard application using make install command:
We edit the sshguard configuration file by setting backend executable file location at:
BACKEND="/usr/local/libexec/sshg-fw-firewalld"
We proceed to symlink the respective folders under /usr/local/stow/sshguard to various locations under /usr/local/ directory:
cd /usr/local/stow/
sudo stow sshguard
We have to ensure that the service file at sshguard.service has the following ExecStart location:
ExecStart=/usr/local/sbin/sshguard
When we make changes to SystemD service file, we need to run the following:
sudo systemctl daemon-reload
sudo systemctl restart sshguard.service
One final check is to ensure the sshguard application is running, we run the following:
systemctl status sshguard.service | less
For further reference on configuring sshguard with firewalld you may refer to the Ctrl blog article titled How to protect SSH remote login in Fedora with SSHGuard and FirewallD by Daniel Aleksandersen.
Follow my blog with Bloglovin
sudo dnf install stow
We install the following dependencies required for building sshguard application:
sudo dnf install byacc flex gcc make
We proceed to download sshguard 2.4.0 from sourceforge.net.
We can then extract to default home location /home/username.
Using terminal/console, set the location to the extracted folder using cd command:
cd sshguard-2.4.0/
We proceed to build the sshguard using source makefile by running configure with installation location set at /usr/local/stow/sshguard and make command:
./configure --prefix=/usr/local/stow/sshguard
make
We proceed to install the sshguard application using make install command:
We edit the sshguard configuration file by setting backend executable file location at:
BACKEND="/usr/local/libexec/sshg-fw-firewalld"
We proceed to symlink the respective folders under /usr/local/stow/sshguard to various locations under /usr/local/ directory:
cd /usr/local/stow/
sudo stow sshguard
We have to ensure that the service file at sshguard.service has the following ExecStart location:
ExecStart=/usr/local/sbin/sshguard
When we make changes to SystemD service file, we need to run the following:
sudo systemctl daemon-reload
sudo systemctl restart sshguard.service
One final check is to ensure the sshguard application is running, we run the following:
systemctl status sshguard.service | less
For further reference on configuring sshguard with firewalld you may refer to the Ctrl blog article titled How to protect SSH remote login in Fedora with SSHGuard and FirewallD by Daniel Aleksandersen.
No comments:
Post a Comment