Dealing with wrong IP geolocation
Since I have my ASN, I use it primarily for my homelab (hosting services to the internet), but I also use my IPs for myself.
The AS number I got was previously used by a Russian company, so recently Google has been telling me that I am in Russia even if the google server I hit is in France.
So on this page, I will describe the process for plenty of IP geoloc company.
Cloudflare
Let’s start with Cloudflare. After a week, Cloudflare tried to get the location from the AS’s organization name, so they used the country code in the inet6num. They combined it, and the location was village called François in France (very small village in the west).
To change that, I sent them an email containing the prefix, the current location (detected by CF), and the actual location.
It took about a week, to have the location corrected, and they won’t notify if they change or not.
Maxmind
For Maxmind, it was easy, they have a data correction page, so I just completed the form with my IP range and it was corrected in a week too.
For Google, there are two solutions: one is using the IP correction form, and the other uses Google’s ISP portal.
I asked a correction from their form and asked an access to the ISP portal.
Change the IPs geolocation from ISP portal
First of all, you will need to publish the geo feed file on a stable server. I have chosen GitHub pages for that, and attached it to a subdomain (e.g. geofeed.domain.net).
To give your geo feed to Google, you need to go to the ISP portal, then Configuration > Data > IP geolocation; you will need to enter your feed url, then click on the submit button.
The process can take up to 2 weeks for them to update the geolocation of your IPs.
What about other DBs?
I tested with some other databases, some tells me I am my LIR at their address, but in general the location seems to be correct.
Better process?
It exists a “better process”, it uses something called geofeed.
Geofeed is a csv that is standardized with RFC 8805, and it is used to correct any errors in IP geolocation.
You need to find a space to host that csv, it can be on your website, on GitHub, or anywhere as long the feed is on a stable web server since providers are fetching them automatically.
Geofeed uses this csv format:
# prefix,country_code,region_code,city,postal
2a0f:85c1:d31::/48,FR,FR-75C,Paris,The region_code can be found on this website, but the only mandatory field is the IP range, all the others are fully optional.
To let others the geofeed, you need to add a field in the inet6num, called geofeed. The field content will just be the url of the csv.
The issue with PA resources
When you use PA resources, you don’t have the permission to modify the fields on the range object. To do so, you can contact your LIR to see if it is possible.
In Lagrange they are really friendly so they accepted to add the field to the prefix they assigned to me.
Conclusion
As I am currently doing corrections on the IP range, the page can change.
I still find the adventure funny, and I learn many things with sometimes my mistakes (accidental anycast), or others adventures I read.
After nearly 3 weeks, I think it can be very useful for me, my homelab and my fun projects, but it needs time to maintain, to read documentations, to setup monitoring and so on. I am still working on the connectivity between my edge router and homelab router. My VMs have internet from my fabulous ASN, but beyond geolocation, running an ASN also brings networking challenges.