PascalMinder / geoblock

Traefik middleware plugin - Deny requests based on country of origin
98 stars 10 forks source link

Defined docker network bridge breaks DNS for Geoblock #40

Closed alfureu closed 11 months ago

alfureu commented 11 months ago

So the situation is that I have set in my docker-compose.yml the following:

      network_mode: traefik_net

I have a local instance of your plugin loaded as file, and whenever I try to load a page with the geoblock plugin, I get the following error:

INFO: GeoBlock: 2023/07/29 12:45:43 Get "https://get.geojs.io/v1/ip/country/XXX.XXX.XXX.XXX": dial tcp: lookup get.geojs.io on 127.0.0.11:53: no such host

As far as I am able to understand this error, it seems as if the plugin is not respecting the docker-compose network definition, and tries to access it elsewhere, which gets blocked. Do you have any solution for this?

EDIT: I have allow local IPs: true enabled, and also I whitelisted 127.0.0.0/24

alfureu commented 11 months ago

nevermind, it was the ad blocker, whitelisting the get.geojs.io domain in it solved my problem