Created
March 12, 2020 17:53
-
-
Save danielcbaldwin/7375e9ee2627c2ac63f2fdfa965d0ed5 to your computer and use it in GitHub Desktop.
Install Fail2Ban Arch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install | |
yay -S fail2ban | |
# Configure | |
sudo vim /etc/fail2ban/jail.d/sshd.local # refer to file below for content | |
# Enable & Start | |
sudo systemctl enable fail2ban | |
sudo systemctl start fail2ban | |
sudo systemctl restart sshd | |
# Check that it worked | |
sudo fail2ban-client status | |
sudo fail2ban-client status sshd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[sshd] | |
enabled = true | |
filter = sshd | |
banaction = iptables | |
backend = systemd | |
maxretry = 5 | |
findtime = 1d | |
bantime = 2w | |
ignoreip = 172.70.0.0/1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment