For “Top Permitted Domains” and “Top Blocked Domains” a new column for the country and the Flag
There’s no reliable way to determine location bound to IP.
What is about this:
it’s only an example
It’s really helpful…I know there is a possibility from https://www.maxmind.com/en/geoip2-services-and-databasesIt’s under license costs, of course…
Are you asking for flags for domains or flags for IPs? The Top Domains are just going to show what
them.ru and you can tell the country by the TLD.
For the IP Addresses / Domain Names of curse
www.pi-hole.net United States New Jersey North Bergen
If a domain is registered in country A and you transfer it to country B, or if the assigned IP was previously in an other country, it can take ages until the IP databases reflect that change.
Hi, this is all valid. But it works for many products/applications in enterprise and for consumer. At the end there is a central Database for all public IP Address! Who-is is a good starting point. And please is is relay simple and not complicated.
We welcome contributions to the code base. Please feel free to code something up and submit a pull request
We already investigated on this some while ago. We initially had a different goal in mind (showing a map) but the underlying issue: Reliably determining the location is similar.
I vaguely remember why we stopped back then, but major issues were, for example, licensing: Where do you get a reliable database that is free to use and sufficiently often updated? And who maintains this database? As Pi-hole is focused on privacy, it is obvious that using some Online Geo API doesn’t work as we’d have to tell someone out of your home network your top domains which is something we certainly don’t want to do, right?
Also, there is a certain latency issue involved here: We ensure that Pi-hole can offer a sufficient performance even on very low end devices such as the original Raspberry Pi 1 or the Zero. We do not have to disable any feature of Pi-hole on such devices and it would be nice to keep this.
A TLD approach would be better, in principle, but yet, you don’t know where
.net (and many more) belong to.
Another issue: How would you handle
CNAME replies (which are more the standard than the exception for any larger Internet company) returning multiple IP addresses possibly in multiple countries? By the first geolocation? Or by the share of the countries?
All questions that need to be addresses before we can really look at an implementation (and yes, I agree that it’d be a nice feature). Even if many commercial products might have this, it doesn’t mean they implemented it in a sane manner. E.g., querying an online API with the first IP you get for a domain really isn’t all that great, yet, it would give you some result.
For me as user there is no benefit or useful information to see the flag of France/Netherlands/Australia… I’m not interested to know where a allowed/blocked domain is registered.
Thank you for the relay good explanation and I understand you concern. Please don’t misunderstand me. I came from the security side and I’m interested to which countries my clients are connected. Maybe someone is infected with some malicious software or whatever. At the end I as a user get a better picture on what’s going on in “MY” network. Not more and not only for security reasons.