Free GeoIP Database to use with Opnsense

Started by Tonton Jo, October 16, 2026, 04:11:02 PM

Previous topic - Next topic
October 16, 2026, 04:11:02 PM Last Edit: October 16, 2026, 04:23:58 PM by Tonton Jo
Hi!

Not sure if it's the right place, but i wanted to share this:

I've vibecoded a script that generate a geoIP database from scratch that matches the requirements in terms of format for Opnsense.



  • It's fully open sources
  • Based on the internet registries database
  • Automatically updated everyday using a workflow
  • PS and Bash scripts to self host / build yourselves available.

The database can be downloaded here and will be automatically updated:
https://github.com/Tontonjo/opnsense/releases/download/geoip/GeoLite2-Country-CSV.zip

Find the scripts for both bash and Powershell usage if you need to self-host here:
https://github.com/Tontonjo/opnsense/tree/main/geoip

Let me know if you find this usefull :)

PS: Sorry for the repost

Regards

Jo


They are providing a database that could be used by the builtin functionality. As an alternative to Maxmind or IPinfo.

Not sure if this is a permitted use of Internet registry info, though.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

I see the intended use, thanks Patrick. Indeed is a redistribution.

Quote from: Patrick M. Hausen on October 16, 2026, 10:25:43 PM[...]Not sure if this is a permitted use of Internet registry info, though.

I imagine all use it at some level. The RPSL registries might give some useful additional info (mainly origin AS), but even that may not provide useful geolocation. I haven't looked at the RADB in years... not sure what's become of it or other IRRs. The RIRs were generally better maintained... heh. A few BGP tables from various route servers could provide additional data. Might be hard to avoid being a pest while gathering said data, although that says more about the infrastructure than the task itself. Too, things might be different these days.