OPNsense Forum

English Forums => 26.7 Series => Topic started by: wiring8228 on September 13, 2026, 11:25:39 PM

Title: [SOLVED] GeoIP Update Behavior
Post by: wiring8228 on September 13, 2026, 11:25:39 PM
How are updates for the GeoIP data currently retrieved? Is this a time-based process, or is it controlled by some other trigger?
I've already tried checking the source code, but I didn't really find what I was looking for.

The documentation also doesn't provide any information on this yet: https://docs.opnsense.org/manual/aliases.html#geoip

Could we perhaps add a description of how this update process works to the documentation if we find an answer here?
Title: Re: GeoIP Update Behavior
Post by: wiring8228 on September 20, 2026, 05:41:46 PM
Unfortunately, I haven't found an answer to my question yet, even though I've looked over the source code again. Of course, I hope that the update occurs automatically at least every 24 hours, or that there is a mechanism that automatically detects when the GeoIP data has been updated and then triggers an update without further delay.
Title: Re: GeoIP Update Behavior
Post by: meyergru on September 20, 2026, 05:57:02 PM
It is approximately every 24h, with the expression "if (time.time() - fstat.st_mtime) < (86400 - 90)" refering to the timestamp of the last update (see geoip.py).

But why does that bother you, when you can even update the alias on the spot via Firewall: Aliases -> Actions -> Update GeoIP?
Title: Re: GeoIP Update Behavior
Post by: wiring8228 on September 20, 2026, 06:58:45 PM
Hey MeyerGru,

Thanks for your answer 🙂

It bothered me because I read somewhere that you would have to manually set an update task as a cron job, but I couldn't find any more information about that. On top of that, I wanted to know if there's a way to get more control over the GeoIP updates, but I guess this isn't possible for now.

Would it make sense to perhaps add a note to the documentation stating that the GeoIP data is automatically updated approximately every 24 hours?
Title: Re: [SOLVED] GeoIP Update Behavior
Post by: meyergru on September 20, 2026, 07:52:29 PM
I suppose you could ask @Monviech (Cedrik) about that - AFAIK he writes most of the documentation.