In this video I will show you how to secure your server from unauthorized connection to it via SSH. Although the SSH connection method itself can be considered secure, it is best to limit the number of attempts that will be made by the user for authorization.
Fail2Ban and its excellent functionality will help us in this, which allows us to block IP addresses and users who have tried to connect a certain number of times but they failed.
Commands used
sudo apt update
sudo apt install fail2ban
systemctl status fail2ban.service
cd /etc/fail2ban
head -20 jail.conf
sudo cp jail.conf jail.local
sudo nano jail.local
ls /etc/fail2ban/filter.d
sudo iptables -S
sudo iptables -S | grep f2b
0 Comments