Can I export the location database to a format like ipv4 | country?
According to the man page, I can choose between different formats but none of them gives me a format that I can use for a simply lookup ip-address → country.
This would be too large to load into memory expanded. You won’t be able to search it quick either. But for HAProxy I can recommend the Lua bindings. We currently don’t ship them with IPFire, but that could be changed:
@ms Any chance to release the database and the LUA bindings now or in the next core release?
Right now I’m writing a LUA script for HAProxy that should use the location database to check the client’s country and possbile block request not originated from the Let’s Encrypt challenge requests.
Maybe the database is already available somewhere, I did not currently find, guess it was just an example in the announcement:
Edit: Database found at /var/lib/location/database.db Edit: Found this comment in a commit to git.
Are the LUA bindings available already for download?
Changes
Removed Lua bindings from repo and dist files, now available separately