Home > HowTo, Linux, Security > Block IP bash script

Block IP bash script

March 30th, 2017 Leave a comment Go to comments

Still working hard to keep my server security locked down from attacks.

This script checks lighttpd logfile for unusual behaviour

Script to monitor and block IPs spaming in varios ways my Word Press and SQUID Server

Update 07/2016
tested on Centos/RedHat/LinuxAMI and lighttpd/squid with iptables

Just add to crontab like crontab -e
*/30 * * * * /usr/bin/block_ips.sh >> /var/log/lighttpd/blockips.log

PREREQ:

  • ┬áipset
  • ┬áiptables

Here is the script:

Here is the script:

  1. No comments yet.
  1. No trackbacks yet.

VAMOVE *

*