Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

How did you choose where to get the IP addresses to block? I guess I'm mostly asking where this problem (i.e. "get all IPs for country X") is on the scale from "obviously solved" to "hard and you need to play catch up constantly".

I did a quick search and found a few databases but none of them looks like the obvious winner.



I used CYMRU <https://www.team-cymru.com/ip-asn-mapping> to do the mapping for the post.


Maxmind's GeoIP database is the industry standard, I believe. You can download a free version of it.

If your site is behind cloudflare, blocking/challenging by country is a built-in feature.


MaxMind is very common, IPInfo is also good. https://ipinfo.io/developers/database-download

If you want to test your IP blocks, we have servers on both China and Russia, we can try to take a screenshot from there to see what we get (free, no signup) https://testlocal.ly/


The common cloud platforms allow you to do geo-blocking.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: