ติดยันต์ Fail2Ban กัน Brute Force Attack กันเถอะ EP 1
แนะนำการทำ Defensive Security โดยใช้ Fail2Ban ในการป้องกัน SSH service หรือ service อื่นๆ บน Ubuntu Linux จากการโจทตี password เช่น brute force attack โดยทำการ ban IP address ที่โจมตีเข้ามา ในคลิปวีดีโอนี้จะแสดงให้ดูตั้งแต่ installation, กำหนด configuration สำคัญๆ, monitoring log และ status ของ Fail2Ban, ไปจนถึง การสั่งยกเลิกการ ban หรือทำการ ban บาง IP address เอง
*** พลาดไม่ได้สำหรับผู้ที่สนใจหรือทำงานสาย Cybersecurity บอกเลย! ต้องดู
คำสั่งติดตั้ง Fail2Ban
$ sudo apt install -y fail2ban
$ sudo cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local
$ sudo nano /etc/fail2ban/jail.local
backend = systemd
$ sudo systemctl start fail2ban
คำสั่ง monitoring และการ ban ของ Fail2Ban
$ tail -f /var/log/fail2ban.log
$ sudo fail2ban-client status
$ sudo fail2ban-client status sshd
$ sudo iptables -nL f2b-sshd
$ sudo fail2ban-client set sshd banip 10.1.0.20
$ sudo fail2ban-client set sshd unbanip 10.1.0.20
แหล่งข้อมูลอ้างอิงต่างๆ
* https://github.com/fail2ban/fail2ban
* https://www.apriorit.com/dev-blog/769-web-protect-web-applications-from-password-cracking
* https://www.plesk.com/blog/various/using-fail2ban-to-secure-your-server/
* https://www.linode.com/docs/guides/how-to-use-fail2ban-for-ssh-brute-force-protection/
by iTongMuan
linux web server