-
Notifications
You must be signed in to change notification settings - Fork 7
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
IP2LOCATION-LITE-DB1.IPV6.BIN manually download and use not working ? #76
Comments
Hey @Tob1as, TBH I don't know what is causing the issue you're having. The dynamic plugin file path is new to me, that didn't use to happen when I originally built the plugin. I personally install the plugin in local mode (see https://plugins.traefik.io/install), so I always have static file paths. Your latest approach should work, and I don't see a reason why it doesn't. As for the logging, the plugin checks on startup if the database file exists and can be opened successfully. If that doesn't work, it will return an error: traefik-plugin-geoblock/plugin.go Lines 74 to 81 in 069f3ec
Maybe give this a try:
|
Hi, Now i make update from 0.11.0 to Version 0.13.0 and copy the new database contained in the plugin (path) to my path. Now I have the same problem as when I load the database from the manufacturer's website, my blocks are ignored. If I use the database from 0.11.0 again (copy in my path), the blocking works again. I will continue to test it. |
Hi I have come up with a custom solution, but it does not look very nice.
entrypoint:
- /bin/sh
- -c
command:
- rm -f /mnt/gop;
( ( sleep 5s ; ln -s /plugins-storage/sources/gop-* /mnt/gop;) & /entrypoint.sh traefik );
geoblock:
plugin:
geoblock:
# Enable this plugin?
enabled: true
# Path to ip2location database file
databaseFilePath: /mnt/gop/src/github.com/nscuro/traefik-plugin-geoblock/IP2LOCATION-LITE-DB1.IPV6.BIN |
Hello,
I have a question because I don't understand something.
Basically the plugin works fine. My config:
In Traefik 2.x docker-compose as command:
Volume
- ./traefik-plugins/:/plugins-local/
Traefik dynamic config:
For Service (test with whoami) i add in compose file:
- "traefik.http.routers.whoami.middlewares=geoblock@file"
First i use
/plugins-storage/sources/gop-<random-numbers>/src/github.com/nscuro/traefik-plugin-geoblock/IP2LOCATION-LITE-DB1.IPV6.BIN
as databaseFilePath. But with every Traefik restart the numbers in the path change, so I copied the file to /plugins-local/ and changed the databaseFilePath to this path.(Path /plugins-local/src/github.com/nscuro/traefik-plugin-geoblock/ from project Readme default not exists.)
This also works, not allowed countries are blocked!
But now I want to use the latest version of IP2LOCATION-LITE-DB1.IPV6.BIN and have downloaded it from the website https://lite.ip2location.com/database/ip-country and overwrite the old file. (The permissions are the same: chmod 755 and root user.)(The bin file is a bit larger.)
But this not working, it does not work even after restarting Traefik and the service. No errors are displayed in Traefik Dashboard.
I have access from allowed country and all others (tested over VPN).
What could be the reason for this? Can I somehow see the logs from Geoblock to see if there is an error when reading the file? (My Traefik log-level is debug.)
The text was updated successfully, but these errors were encountered: