From 07bedee34d9ded6f86904c7e4b4e02464ff8cb14 Mon Sep 17 00:00:00 2001 From: Silvino Silva Date: Thu, 15 Sep 2016 00:47:34 +0100 Subject: added tools --- tools/fail2ban.html | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 tools/fail2ban.html (limited to 'tools/fail2ban.html') diff --git a/tools/fail2ban.html b/tools/fail2ban.html new file mode 100644 index 0000000..9fad021 --- /dev/null +++ b/tools/fail2ban.html @@ -0,0 +1,37 @@ + + + + + 1. Fail2ban + + +

1. Fail2ban

+ +
+       $ prt-get depinst fail2ban
+       
+ +

1. Configure

+ +

To start fail2ban at next boot edit /etc/rc.conf and add fail2ban. + Fail2ban will verify if /etc/fail2ban/jail.local exist, if exist will + use it. Copy distribution jail.conf to jail.locol;

+ +
+       $ sudo cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local
+       
+ +

Edit /etc/fail2ban/jail.local, example configuration;

+ +
+       [ssh-iptables]
+
+       enabled  = enable
+       filter   = sshd
+       action   = iptables[name=SSH, port=ssh, protocol=tcp]
+                  sendmail-whois[name=SSH, dest=admin@box, sender=fail2ban@box, sendername="fail2ban"]
+                  logpath  = /var/log/auth
+                  maxretry = 5
+       
+ + -- cgit 1.4.1-2-gfad0