go
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.
 
 
 

13 lines
235 B

  1. #!/bin/bash
  2. source /etc/profile
  3. IFS=$'\n'
  4. # cron for every minute run
  5. # block ssh
  6. IPs=$(curl -s https://login:password@my-watchtower.ru/list/sshd/1)
  7. for ip in $IPs
  8. do
  9. echo "Blocking IP $ip"
  10. fail2ban-client set sshd banip $ip
  11. done