Re:Who's Attacking My Server?
by lmarcos on Sunday March 13, 2022 @11:33AM
(#30662117)
Any documentation on how to do "geo fencing" without relying on third parties? Is it enough to have one big static list of ip addresses (or subnets)? How often does the list need to be updated?
[ Parent
| on HN ]
I used to do this with a local copy of the IP2Location database [1]. This way you don't have to poll a third party. The caveat is you have to keep the database up to date.
It depends on what you’re doing and who the legit users are.
The downside of static lists is that AWS, Azure, etc frequently purchase IP spaces and realign them with US datacenters. Probably not an issue for blocking Russia or China, but if you want US only traffic, or North American traffic, you can run into problems.
Re:Who's Attacking My Server?
by chockchocschoir on Sunday March 13, 2022 @12:48PM
(#30663056)
You cannot know where a server is physically located, as even self-reported locations are incorrect (by accident and/or on purpose) and there is no such thing as non-3rd party data about physical location as servers as again, it's self-reported and any registry can say whatever they want in regards to where a server is located.
There are many different 3rd party sources for geo locating IP addresses, maybe MaxMinds is the most popular one. But if you acquire a few, you'll notice that sometimes even they don't agree where the location of a server is.
Re:Who's Attacking My Server?
by nazgulsenpai on Sunday March 13, 2022 @01:47PM
(#30663784)
I'm reminded of this story[0] from a few years ago where a family in Kansas was raided by every US ABC agency because MaxMinds was using their lat/long as the default when there was no exact position.
https://www.theguardian.com/technology/2016/aug/09/maxmind-m...
Cloudflare lets you block countries, ASNs and IP blocks.