Blocking IP addresses is easy. You might want to read up (howto,
man page etc.) on iptables so you generally understand what is going on, but basically the rules you want to add (one per IP address) would look like one of the following:
Code:
iptables -A INPUT -s <IP address> -j DROP
iptables -I INPUT <rule number> -s <IP address> -j DROP
They both drop packets coming from <IP address>. The first appends the rule to the end of the INPUT rules, and would be useful if you are using a script to set up your firewall. The second form inserts the rule at <rule number>, and is useful in adding a rule to an already running firewall.
But do read up some first -- it
does matter where you put these rules wrt the rest of the firewall rules.
I've never run a web server, but I
thought you asked web crawlers such as Google's to stay out with a
robots file. Other than that, the only thing I would know to do would be to block the IP addresses at the firewall ... if you can find out the IP addresses.