0

.About a month ago my website was hacked.

I was alerted to that by Google Adwords because a random scan of my site indicated that it had inappropriate content and / or links to inappropriate content and my ad was disabled / disapproved.

I confirmed that it had been hacked.

My ISP and I restored the website from a backup and fixed(?) the problem, which did not originate from my site and affected other sites that the ISP is hosting.

I started to use .htaccess to block IPs, which is helping, but I still have a few issues and am hoping that someone can provide some guidance on how to resolve them.

The main issue is that when I block some, but not all, IPs I end up blocking myself in spite of the fact that my IP is completely different from the IP I am trying to block. (This means I have to check each individual IP rather than simply blocking a group and can't block some IPs.)

Any suggestions on how to proceed would be appreciated.

2
  • You ask two unrelated questions in one post. Please limit yourself to one question at a time. Commented Jan 8, 2019 at 14:07
  • 1
    "The main issue is that when I block some, but not all, IPs I end up blocking myself in spite of the fact that my IP is completely different from the IP I am trying to block." - That sentence doesn't make much sense, unless there is something else going on here that we are not aware of? If your "IP is completely different from the IP [group] you are trying to block" then it shouldn't block your IP address? But, unless you know exactly how these IP blocks are allocated then blocking entire "groups" is bound to catch legitimate users.
    – MrWhite
    Commented Jan 8, 2019 at 23:13

2 Answers 2

1

blocking IPs individually would be a very tedious task, I recommend installing a Web Application Firewall (WAF) service such as cloudflare which offers a free plan for small sites that would take care of blocking bad traffic automatically

As for the page not found errors originating from nonexistent pages on your website this is something you can't stop as bots/spiders will continue to look pages for either indexing, so you can safely ignore that (I know it just increase log size but there is nothing you can do about it)

1

As you mention you are using .htaccess this means you are using Apache. Apache provides several modules for such tasks:

  • mod_evasive
  • mod_cband
  • mod_security
  • mod_qos

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.