fail2ban.sh 561 B

123456789101112131415161718
  1. #!/bin/sh
  2. # TODO check if root
  3. echo '\033[35m
  4. ______ _ _____ __
  5. / ____/___ _(_) /__ \ / /_ ____ _____
  6. / /_ / __ `/ / /__/ // __ \/ __ `/ __ \
  7. / __/ / /_/ / / // __// /_/ / /_/ / / / /
  8. /_/ \__,_/_/_//____/_.___/\__,_/_/ /_/
  9. \033[0m'
  10. echo "\033[35;1mInstalling fall2ban \033[0m"
  11. apt-get --yes --force-yes install fail2ban
  12. cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local
  13. # ToDo ask for email and configure jail.local with it
  14. systemctl enable fail2ban
  15. systemctl restart fail2ban
  16. echo "\033[92;1mfail2ban installed and configured\033[Om"