Hi,
I would like to achieve a working scenario where I will be able to restrict access only for certain countries per service. My host has configured couple IPSETs to represent certain regions and I would like to be able to refer to them from the traefik label configuration settings to restrict access to a given service.
It is impossible to do it via traefik.http.middlewares.test-ipwhitelist.ipwhitelist.sourcerange=PREFIX
for example..
Example scenario
IPSets:
- country_germany
- country_france
- country_sweden
- proxies_level1
- bots_level3
Services:
- DNS:
- block:
proxies_level1
&bots_level3
- allow:
all
- block:
- Forum:
- allow:
country_germany
- block:
all
- allow:
and so and so..
So goal is to achieve this via Traefik label configuration using middleware which would communicate with host's ipsets to understand the reference (e.g.country_germany
) and then perform cofnigured action (allow
or block
)..
E.g.:
traefik.http.middlewares.ipset-only-germany-and-france-in.ipset.allow=country_germany, contry_france
Is this possible to achieve now or is it someething traefik devs can look into? Much appreciated, Thanks