-
-
Notifications
You must be signed in to change notification settings - Fork 662
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rewrite Geoblock (use new mmdb) #2675
Conversation
Signed-off-by: Daniel Hansson <mailto@danielhansson.nu>
Signed-off-by: Daniel Hansson <mailto@danielhansson.nu>
Signed-off-by: Daniel Hansson <mailto@danielhansson.nu>
Signed-off-by: Daniel Hansson <mailto@danielhansson.nu>
Signed-off-by: Daniel Hansson <mailto@danielhansson.nu>
... but it's not logging blocked attempts yet. Signed-off-by: Daniel Hansson <mailto@danielhansson.nu>
Signed-off-by: Daniel Hansson <mailto@danielhansson.nu>
Signed-off-by: Daniel Hansson <mailto@danielhansson.nu>
Signed-off-by: Daniel Hansson <mailto@danielhansson.nu>
Signed-off-by: Daniel Hansson <mailto@danielhansson.nu>
tested on Ubuntu 22.04 and 24.04 Signed-off-by: Daniel Hansson <mailto@danielhansson.nu>
Signed-off-by: Daniel Hansson <mailto@danielhansson.nu>
Signed-off-by: Daniel Hansson <mailto@danielhansson.nu>
Signed-off-by: Daniel Hansson <mailto@danielhansson.nu>
Signed-off-by: Daniel Hansson <mailto@danielhansson.nu>
Signed-off-by: Daniel Hansson <mailto@danielhansson.nu>
Signed-off-by: Daniel Hansson <mailto@danielhansson.nu>
Signed-off-by: Daniel Hansson <mailto@danielhansson.nu>
Signed-off-by: Daniel Hansson <mailto@danielhansson.nu>
Many thanks for the change. Unfortunately I can't update to the new module. I get 'Update limit for Maxmind GeoDatabase reached! Please try again tomorrow.'. I found the following: From March 2024; Every account is limited to 1,000 total direct downloads (30 for GeoLite accounts) in a 24-hour period. (https://support.maxmind.com/hc/en-us/articles/4408216129947-Download-and-Update-Databases) This appears to come from lib.sh and I assume this is due to the hard-coding of an Account ID and license. This means that anyone will be using your credentials to download the database. The download appears to be done with a Docker image? Not too sure about how this works but do we need to download the City IP database? I thought we are only using the country database: echo "GEOIPUPDATE_EDITION_IDS=GeoLite2-City GeoLite2-Country" I believe part of the reason for MaxMind deprecating the old database format is they could not control or monetize it for corporate users with the old APIs. I have created my own login and can download the database myself. Maybe a few more instructions would be good it add to explain that if the download fails, the database could be sideloaded? I would think if the database already exists in the correct location then the update would not fail the download. People can create their own MaxMind account and license so that the downloads will be per deployment and therefore no longer hit a limit in lib.sh. It will make the use of this module more of a pain to setup but I think it is the only realistic way to make sure it works for everyone. |
Thanks for your input, I have now disabled the City DB. :) You might be correct that that's part of the problem as that takes one extra download. Regarding license, yes, it's the only way. You need an account. Anyone will be able to abuse it, but I hope they don't. To limit the attempts I chose to save the The Another option I've thought about is to download some old files to this repo, and use them initially, then when the user updates it will update those files. But I don't know yet, we'll see how this pans out. |
Wierd, what happens if you run this manually?
|
That works but is the logic correct earlier. I assume that line 26 of geoblock.sh should be saying 'If old geoblock is not installed AND new geoblock is not installed' then this is a fresh install, otherwise, uninstall? |
Well, good point. You're absolutely right! |
I work for IPinfo, where we have a free IP to Country database with more lenient licensing terms and better accuracy. This ticket has been merged and closed, so I have opened a new issue ticket pitching our free IP to Country database with more lenient license terms, which are particularly helpful for packaging and distributing data. Our database is licensed under CC-BY-SA 4.0, which permits distribution (even for commercial purposes). We only require an attribution statement. This is one aspect of the database there is more. Please share your thoughts on my feature request ticket: #2682 |
@szaimen @aaaskew Please test this PR. Please note it requires some new functions, please see the lib file in this PR.
FIx #2674