4 comments on “Blocking hackers and spammers from your site

  1. Hi there,
    This is an amazing guide!
    I have made a little tool that uses ipinfodb.com’s information to allow or deny different ranges to a IIS configuration.

    LINK: http://www.ivault.dk/?p=749

    Kind regards
    Nikolaj Hansen

  2. Hi there. What do you do if you know who’s in your system but don’t know their method? Can one entity be blocked? One person? Thanks. S.

    • Hi Susan

      If “you know who is in your system”, and you commented here I guess you have access to your logs and “you know who” always has the same IP address. Then yes you can block individual IPs.
      The follow up to this aticle covers other types of identifier that can also be blocked. e.g. User Agent (if it appears unique to the unwanted “user”).

      Examples of blocking individual IPs & User Agents can be found here thesitewizard.com/apache/block-bots-with-htaccess.shtml However, individual checks like these are often ineffective; spammers often hide their real IP behind proxies that allow them to keep coming back with different IPs. User Agents are often spoofed to appear as a normal legitimate browser.

      If by “you know who is in your system” you mean a registered user, then all the main CMS/packages like WordPress will provide you with some way of deleting the user – ask at the support forum for your package.

      If you are talking about accessing the system without having registered/running scripts you are best off posting a question on a forum like Stackoverflow.com (there is always someone there who knows the answer). Use your logs to find out which scripts they are running – don’t give your site address when posting the qn either.

  3. I installed the iptables country-blocking script from cyberciti recently, blocked just one country and have seen the number of requests on my webserver drop by 90%. That 90% was almost pure WordPress comment spam. From a ‘common good/Internet-is-eighth-wonder-of-the-world’ POV, it feels like a bad thing to do. It’s certainly not secure – all that a country-level block prevents is the lame scripts of the unwashed masses.

    The obvious benefit is the loss of 5-20 emails a day announcing comments for moderation that the spam filter missed. We could wish for better spam filters, but I suspect the sheer volume of crap would mean an elevated number of false negatives creeping through.

    Like anything else, it has pros and cons.

Your Comments & Questions

email address is optional and is not displayed