Procházet zdrojové kódy

Add the usage of fail2ban

Xi Ruoyao před 7 roky
rodič
revize
5e84f70df7
1 změnil soubory, kde provedl 9 přidání a 0 odebrání
  1. 9 0
      content/post/script-kid.md

+ 9 - 0
content/post/script-kid.md

@@ -54,3 +54,12 @@ guys are naive!  I can tell you I am angry.  What you are doing is useless.
 我今天是作为一个 ACMer 和你们讲。我不搞网络安全,但是我见得太多了。
 在网上搞事情还是要按照基本法!
 你们啊, naive ! I am angry 我和你讲,你们这样子是不行的。
+
+## Use Fail2Ban to stop the kids automatically
+
+Fail2Ban parses `/var/log/auth.log` to find the IPs keep trying to login
+via SSH and use `iptables` to ban them automatically.
+
+`sudo apt install fail2ban`, `systemctl enable fail2ban` and
+`systemctl start fail2ban`.  The default configuration can ban the brute
+force attack on SSH.