Table of contents of the article:
How a German IP address ended up blocked as "Brazilian," and what it taught us about geolocation databases.
A few days ago, we received a report that, at first glance, seemed like a simple network issue. A customer wrote to us that their server was no longer communicating with one of the sites we manage: calls were being made, but nothing was coming through on the other end. There were no application errors, no expired certificates, no recent DNS changes.
The client's server was hosted on Hostinger . The site he couldn't reach was protected by CFM 4 Linux , our centralized management solution for Linux server firewalls. It had a fairly common Geo-Blocking rule active : blocking traffic from South America , including Brazil, while allowing the rest of the world, especially Europe, to pass through.
The problem was that the client's server wasn't in South America . It was in Düsseldorf , Germany.
This article explains how we got there, why it happened, and, most importantly, why three sources that seem to answer the same question— "What country is this IP address from?" —actually answer three different questions. If you run a firewall, a CDN, an anti-fraud system, or even just a security plugin that blocks by country, it's a distinction worth knowing before finding a customer blocked for no reason.
Context: CFM 4 Linux and its Geo Blocking
CFM 4 Linux ( Centralized Firewall Manager ) is the tool we developed internally to manage firewall rules for all the Linux servers we manage from a single console. It was born when manual, server-by-server management became unsustainable: aggressive bots, AI crawlers, and distributed attacks requiring the same rule to be applied to dozens or hundreds of machines in a matter of seconds.
The architecture is simple:
- un central server with the web console, where policies are defined: blocking rules, global whitelist with block precedence, server groups, single-node exceptions;
- un agent lightweight on any server, which asks periodically at the center the updated policy (model pull over HTTPS, with no incoming ports open) and applies it to the local firewall: iptables, nftables o firewalld, always in dedicated chains, without touching the system rules;
- policies versioned, with differences between versions and reverting to the previous version in case of error.
Among the features, Geo-Blocking is one of the ones we use most. It allows you to block entire countries or entire continents with a click, and you can choose how to behave for each server:
- inherit: follows global geographic policy;
- Allow-Only: the server only responds to explicitly allowed countries;
- Deny-Only: Block only the specified countries, the most common choice.
Under the hood, the rule isn't a handwritten list of IP addresses. It's a list of countries , which CFM 4 Linux translates into network prefixes using a GeoIP database : blocking a large country means loading tens of thousands of prefixes (for China, that's about 80.000 IPv4 prefixes). On servers with nftables, the prefixes are stored in dedicated sets , with constant-time lookups. Up until now, two databases were used: DB-IP Lite and the regional registry delegates (RIRs: RIPE, ARIN, APNIC, LACNIC, AFRINIC).
And it is precisely there, in the transition from "country" to "prefixes", that the problem of this article arose.
The survey: one IP, four identical answers and one different one
The client's server address belonged to the block 187.126.0.0/19: 8.192 addresses, which for convenience we will call with one of them, 187.126.16.144.
The first thing we did was ask independent sources where he was. Here's what we got, as of October 27, 2026:
| Pig iron | Response |
|---|---|
| RIPE NCC Registry (RDAP/WHOIS) | block 187.126.0.0 – 187.126.31.255, village DE, made out to Hostinger Operations UAB |
| RIPE NCC Delegation File | ripencc|LT|ipv4|187.126.0.0|8192|20250313|allocated |
| MaxMind GeoLite (accessed via RIPEstat) | DE, Düsseldorf, 100% coverage |
| ipinfo.io (counter-proof) | DE, Düsseldorf, AS47583 Hostinger International |
| BGP Routing | 187.126.0.0/19 announced by AS47583, Hostinger |
| DB-IP Lite (October 2026 database) | BR, Brazil |
Four out of six sources say Germany. One says Lithuania. One says Brazil, and that's precisely what the geographical rule was based on.
To understand how this is possible, we need to take a step back and tell the story of this address block.
A Brief History of an IPv4 Block
IP addresses are not distributed randomly. The central authority (IANA) assigns large blocks to five regional registries (RIRs):
- AFRINIC for Africa;
- APNIC for Asia and the Pacific;
- ARIN for North America;
- LACNIC for Latin America and the Caribbean;
- RIPE NCC for Europe, the Middle East and part of Central Asia.
The block 187.0.0.0/8 born in Latin America, under LACNIC. For years the addresses 187.126.x.x they have been, in a completely legitimate way, addressed Brazilian, assigned to operators in Brazil.
Then something happened that has become very common in recent years: IPv4 addresses are running out. New ones aren't being created, and those who need them buy them from those who have excess. A real transfer market exists, regulated by registries, which allows a block to be moved from one holder to another and, in some cases, from one registry to another.
Our 187.126.0.0/19 This is one of these cases. According to data from the European registry, the block is currently registered at RIPE NCC on behalf Hostinger, with a dated registration March 13, 2025Hostinger uses it in its data centers in Germany, which is where our client's server was located.
So, an address that had been Brazilian for its entire previous history has, since March 2025, effectively been a European address, used in Germany. The real world has changed. The question is: have geolocation databases noticed?
As we have seen, not all of them.
Three sources, three different questions
The crux of the problem is that we tend to equate three very different types of data. Let's look at them one at a time.
1. The RIR delegation files: "Who was assigned this block?"
Each regional registry publishes daily statistics files, called delegated files , which list all the address blocks it has assigned. Each line lists: which registry, which country, which resource type, the starting address, how many addresses, a date, and the status. It's exactly the line we saw above:
ripencc|LT|ipv4|187.126.0.0|8192|20250313|allocated
It's official, free, and up-to-date data : by design, the registers always know who owns what. And it's the first to receive transfers: in the RIPE NCC file, the block already appears as European.
But pay attention to the meaning of that LTThe official format specification is very clear:
«The cc value identifies the country in which the resource holder is legally based.»
And he adds, without mincing words:
«This value can therefore not be reliably used to map IP addresses to countries.»
Il LT This does not mean that the server is in Lithuania. It means that the owner of the block, in this case the Hostinger company that acts as the Local Internet Registry, is headquartered in Lithuania. Its servers are located in Germany.
It's the same reason why the addresses of large cloud providers and CDNs, which are assigned to companies based in one country but used in data centers around the world, often appear "American" or "Irish" even when responding from Milan or Frankfurt.
In summary :
- Benefits: official, free, updated every day, transfers follow immediately.
- Defects: they are not geolocation. They say who owns the block and where it is based, Not where Addresses are used. The granularity is coarse: entire blocks, not individual networks.
- When to use them: for administrative reasons («I don't want addresses registered to organizations in country X»), as a check of consistency and to notice a transfer.
2. DB-IP Lite: "Where is the person using this IP likely located?"
DB-IP is a geolocation data provider that offers, alongside commercial products, a series of free databases called Lite : IP to Country Lite , IP to City Lite and IP to ASN Lite , downloadable in CSV or MMDB.
The great advantage of DB-IP Lite is its simplicity:
- no registration;
- direct download;
- license Creative Commons Attribution 4.0, which allows use as long as DB-IP is cited as the source (for web applications, a link to db-ip.com is required).
This is why it is found in so many open source tools and security panels.
This is precisely why it's important to carefully read what DB-IP itself says about its free databases. The Lite versions:
- are updated once a month;
- I am, literally, «subsets of the commercial databases with reduced coverage and accuracy»: subsets of commercial databases, with reduced coverage and precision.
The paid versions offer, again according to DB-IP, greater accuracy, more records and daily updates.
In our case, the Lite version from October 2026 still ranked 187.126.0.0/19 including Brazil, more than nineteen months after that block was transferred to a European registry and a German datacenter. We don't know whether the commercial version already had the correct data: we can only note that the free version did not.
In summary :
- Benefits: free, no account, permissive license, full IPv4 and IPv6 coverage.
- Defects: monthly update, reduced precision compared to commercial and, as our case shows, a certain inertia on transferred blocks.
3. MaxMind GeoLite2: the same question, with a different database and a different pace
MaxMind is probably the best-known name in IP geolocation. Alongside its commercial products (GeoIP2), MaxMind also offers a family of free databases called GeoLite : Country, City, and ASN, in MMDB or CSV format.
Compared to DB-IP Lite, there are three practical differences.
Access. Since 2019, GeoLite is no longer an anonymous download. You need a free account, generate a license key , and accept a license agreement (the GeoLite End User License Agreement , last updated February 12, 2026). Database downloads are limited to 30 per day , which is more than enough for those updating a central server.
The rhythm. According to the MaxMind documentation:
- the databases Country e City they are updated every Tuesday and Friday;
- the ASN database every weekday.
Twice a week versus once a month.
The license , which should be read carefully, especially by those who provide services to others. The free version:
- requires theattribution, with a text like this «This product includes GeoLite Data created by MaxMind»;
- requires using the latest version and destroy old copies within 30 days from the release of a new release;
- grants the use «for your own internal business purposes», that is, for its own internal purposes.
Anyone integrating this data into a product or service for customers would do well to ask themselves, and possibly ask MaxMind, whether their case falls under this formula or whether one of the commercial licenses is required (MaxMind provides a specific one for the redistribution of GeoLite data).
In our case, GeoLite answered correctly: Germany, Düsseldorf.
It's also fair to say that MaxMind itself is honest about the limitations of geolocation: it calls it "inherently imprecise" and warns that the free City version is "considerably less accurate" than the paid version. At the country level, which is what a firewall needs, reliability is much higher than at the city level. But it's still an estimate , not a demographic fact.
In summary :
- Benefits: updated twice a week, excellent transfer performance in the case we analyzed, very popular format.
- Defects: mandatory account, more restrictive free license to be evaluated on a case-by-case basis, obligation to update within 30 days (which must be automated), and attribution required.
Comparison in a table
| RIR delegation file | DB-IP Lite | MaxMind GeoLite2 | |
|---|---|---|---|
| What it really says | country of the registered office of the block holder | estimated location of the person using the IP | estimated location of the person using the IP |
| Updates | daily | monthly | Country and City: Tuesday and Friday |
| Admission | Open admission | Open admission | free account + license key |
| License | public registry data | CC BY 4.0, with attribution | GeoLite EULA, with attribution, internal use, updated within 30 days |
| Declared accuracy | it's not geolocation | reduced compared to commercial | reduced compared to commercial, especially for the city |
| In our case (187.126.16.144) | LT (owner's headquarters) | BR (data exceeded) | DE (correct) |
| Suitable for geo-blocking "where it comes from" | no, just as a counter-proof | yes, with reservation | Yup |
Mistakes that make the problem worse
So far, this might seem like the story of a database that gets a wrong address. In reality, analyzing the case, we found three design errors in CFM 4 Linux's geoblocking . These are common errors, and we're disclosing them openly because we believe they'll be useful to anyone building a geoblocking system.
Mistake #1: Adding Sources
To "play it safe", CFM 4 Linux used two sources together , DB-IP Lite and RIR data, and considered an address to belong to a country if at least one of them said so.
It seems prudent. It's the opposite. If you block Brazil and even one in two sources says "Brazil," the address is blocked. In our case:
- DB-IP said BR, and that alone was enough to block it;
- the RIR data said LT, a European country that the rule would have let through, but it didn't count;
- the reality was DE.
Adding two imperfect sources doesn't add their reliability, it adds their errors . Even just one is lagging behind to produce a false positive. And with a rule as broad as "all of South America," there can be many false positives.
Mistake #2: Different responses for the same IP
There is a more subtle side effect. When two sources assign the exact same prefix (/19 (In both cases) to two different countries, a tool searching for "the most specific prefix containing the IP" finds a tie. Depending on how the database internally sorts the results, the answer may be BR or LT.
For those who investigate, it is disorienting: the same address changes nationality from one search to the next, and neither answer is the right one.
Mistake #3: Updating your database doesn't mean updating your firewalls.
The third mistake is the most insidious, and concerns any architecture in which data is prepared in a central point and used across many servers.
In CFM 4 Linux, agents on individual servers receive the list of prefixes to block from the central server and store it in a local cache, so as not to download hundreds of thousands of rows each time. The central server notifies agents when the policy changes, for example when a country is added or removed. However, an update to the GeoIP database, with the same number of blocked countries, was not considered a policy change . Thus, the servers continued to use the prefix list from the previous version without any problems, even weeks after the central update.
In this specific case, it wouldn't have changed anything, because even the new DB-IP database still said Brazil. But that's the reason why "we've updated the GeoIP database" isn't enough of a response to a blocked client: you need to verify that the update actually reached the firewall that made the decision.
There's also a downside worth mentioning: when you force an update across the entire fleet, hundreds of servers request the same data at the same time. If the central system slows down and a server is left without its copy of the prefixes, the design decision becomes critical: it's better to maintain the existing rules than to apply the new policy without the geographic component and, in effect, be left without protection.
What we did, and what we recommend
In the immediate future
The solution for the customer was simple and targeted: an exception for their provider's network , which immediately unblocked traffic without weakening the rule for everyone else. It's a good general rule: when a known partner is blocked due to a geolocation error, the quickest and safest fix is a specific exception (on the IP, block, or ASN), not relaxing the geolocation rule.
Fully operational
This case has convinced us to rethink our entire geolocation management. These are the choices we've made, and which we recommend.
-
A single primary source for block decisions. We planned to transition CFM 4 Linux's Geo Blocking to MaxMind as the single source, instead of merging DB-IP Lite and RIR (MaxMind integration was already on the project roadmap). The reason is the pace of updates and the behavior regarding transferred blocks, which in our case was correct. Before the transition, we asked ourselves, and MaxMind, the question of licensing: for a managed service provider, this is not a minor detail.
-
Other sources serve as counter-evidence, not as additional evidence. Registry data remains valuable for one specific reason: when geolocation and the registry disagree, there's almost always a story behind it, be it a transfer, a data center, or a global provider. The disagreement should be brought to the attention of the operator , not resolved silently with a sum of money. Information like "located in Germany, registered in Lithuania" helps quickly understand a case like ours.
-
Automatic and verifiable updates. The database updates itself twice a week. Before the new data goes into effect, a preview shows for each server how many prefixes will be unblocked and how many will be blocked for the first time. If the discrepancies exceed a reasonable threshold, the update stops and asks a person for confirmation.
-
Guaranteed propagation, in waves. Each database update is treated as a real policy change and reaches all servers in batches to avoid overloading the central system. In the event of a problem, firewalls retain the current rules instead of being left without geographic protection.
-
A check with known cases. With each update, we check that a handful of addresses with a known location are in the correct country. Our 187.126.16.144 has entered this list: from now on, it must always be German.
Some general advice for those who geo-block
- Decide what question you are asking. If you are interested where does it come from? traffic, you need geolocation. If you're interested who do they belong to? addresses, you need the register. Using one instead of the other produces errors.
- Remember that geolocation is an estimate. Even the best databases fail, especially on recently transferred blocks, mobile networks, VPNs, CDNs, and cloud providers. A rule that blocks an entire continent by definition accepts a certain amount of false positives.
- Prefer targeted exceptions to broad rules. Blocking "all of South America" is convenient, but it also affects legitimate customers, suppliers, and services. Where possible, it's best to combine geolocation with other signals: IP reputation, rate limits, and authentication.
- Keep an eye on the calendar. A free database updated once a month can be weeks behind, and on certain blocks, as we've seen, much more.
- Read the licenses. "Free" doesn't mean "unconditional": attribution, internal use, and the obligation to update are real constraints, especially for those who offer services to third parties.
Conclusion
Three systems that seem to give the same answer, actually answer three different questions:
- i RIR files they say where the owner of a block of addresses is based, and they say it in an official and timely manner;
- DB-IP Lite Estimate the location of someone using an address, with a free, convenient database that is updated once a month;
- MaxMind GeoLite2 makes the same estimate with another database and a biweekly rhythm, in exchange for a more demanding license.
None of the three are absolutely "wrong." They become wrong when they're used for the wrong question, when they're added blindly, or when it's assumed that updated data on the central server automatically determines the firewall's decision.
Our German address with a Brazilian background reminded us of this in the most concrete way possible: with a client who couldn't work. We resolved his case in a matter of minutes. Revising the system to prevent a repeat took a little more work, which is why we decided to share it.
Sources
- RDAP Registry:
https://rdap.org/ip/187.126.16.144(accessed 10/27/2026) - RIPE NCC Delegation File:
https://ftp.ripe.net/pub/stats/ripencc/delegated-ripencc-latest - RIR Statistical Format Specification:
https://ftp.ripe.net/pub/stats/ripencc/RIR-Statistics-Exchange-Format.txt - RIPEstat, MaxMind geolocation, and prefix overview:
https://stat.ripe.net/ - DB-IP Lite:
https://db-ip.com/db/lite.php - MaxMind GeoLite:
https://dev.maxmind.com/geoip/geolite2-free-geolocation-data - MaxMind GeoLite EULA:
https://www.maxmind.com/en/geolite/eula - MaxMind, refresh rates:
https://support.maxmind.com/knowledge-base/articles/download-and-update-maxmind-databases
This product includes GeoLite data created by MaxMind, available at https://www.maxmind.com.
