opnsense / core

OPNsense GUI, API and systems backend
https://opnsense.org/
BSD 2-Clause "Simplified" License
3.39k stars 757 forks source link

Cron for geoip DB update #6892

Closed 0nnyx closed 1 year ago

0nnyx commented 1 year ago

Important notices

Before you add a new report, we ask you kindly to acknowledge the following:

Is your feature request related to a problem? Please describe.

Geoip DB is apparently never updated unless downloaded manually through ui/firewall/alias#geoip

I didn't see any geoip auto update in opnsense github code but correct me if I'm wrong

Describe the solution you like

Add a cron entry at ui/cron to allow geoip DB automated updates

Describe alternatives you considered

Manual download

Additional context

From Maxmind site, the DBs are updated twice weekly, every Tuesday and Friday. https://dev.maxmind.com/geoip/geolite2-free-geolocation-data

When using geoip blocking, it's good practice to schedule at least a monthly geoip update.

AdSchellevis commented 1 year ago

it's updated every day, has a lifetime (TTL) of a bit under 86400 seconds.

https://github.com/opnsense/core/blob/78b76cb5050d77ec27833ad018cee22e71550402/src/opnsense/scripts/filter/lib/alias/geoip.py#L138

If you want to add a note or tip to the docs, you can find the source of our documentation here https://github.com/opnsense/docs/blob/master/source/manual/aliases.rst#L53 (just open a pull-request)

0nnyx commented 1 year ago

I missed that obvious part... Thanks for pointing it out. Closing this request.