Jump to content

How best to block ip address ranges - Geolocation


bnadauld

Recommended Posts

Im getting a load of traffic that all seems to be from China. Its causing sql timeouts and shutting mt site down. i can see PS 1.7 has a feature called Geolocation but ive never used it. When i click on the link in 'In order to use Geolocation, please download this file and extract it (using Winrar or Gzip) into the /app/Resources/geoip/ directory.' its missing.

Can someone link me this file or is there a better list or way to totally block china?

Ive read about https://www.projecthoneypot.org/

but maybe this is overkill for just blocking a few countries.

 

Thanks for the help

Edited by bnadauld (see edit history)
Link to comment
Share on other sites

be warned, if you enable native geo location and the IP does not resolve (high % of free geolitecity free data do not resolve) then the visitor cannot shop.

We have geo targeting pro module on addons, it supports amongst other things ip blacklist much like native does but I can see where it would be a nice new feature or new module to block by country.

Back to hosting, contact your hosting for advice but this might help as well

https://www.ip2location.com/free/visitor-blocker

  • Like 1
Link to comment
Share on other sites

On 3/15/2020 at 5:48 AM, El Patron said:

or advice but this might help as well

Thanks for the advice and link. Do you know if the 'Block Visitors by Country Using Firewall' list generator is something that needs to be constantly updated?

Link to comment
Share on other sites

15 hours ago, bnadauld said:

Thanks for the advice and link. Do you know if the 'Block Visitors by Country Using Firewall' list generator is something that needs to be constantly updated?

if it works but then starts to leak you can consider then updating.  I'd first see if this is viable alternative.  I added this feature to our roadmap as it would be pretty handy.

Link to comment
Share on other sites

  • 2 months later...

i found a cool way that worked really well for bots

  1. find what server you have (i had an Apache server)
  2. go to: https://www.ip2location.com/free/visitor-blocker
  3. scroll to the bottom and choose you country that you want to block and the server from step1.
  4. Generate the file
  5. Open your .htaccess file from your website directory or root
  6. Add the info from the file (step 4)

No more bots (or customers from Singapore for me)

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...