You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
327 B

  1. #!/bin/bash
  2. ## Depends lxc-scripts installed
  3. ##
  4. ## Install
  5. ##
  6. apt-get install -y fail2ban </dev/null
  7. sed -ri 's/^(bantime\s+=\s+.*)$/bantime = 1w/g' /etc/fail2ban/jail.conf
  8. sed -ri 's/^(findtime\s+=\s+.*)$/findtime = 26w/g' /etc/fail2ban/jail.conf
  9. ##
  10. ## Test
  11. ##
  12. # fail2ban-client status
  13. # fail2ban-client status sshd