Traefik using host's IPSETs as reference for restricting access to the service


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


  • country_germany
  • country_france
  • country_sweden
  • proxies_level1
  • bots_level3


  • DNS:
    • block: proxies_level1 & bots_level3
    • allow: all
  • Forum:
    • allow: country_germany
    • block: all

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)..

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

Sorry for being needy on this case but seriously nobody from @traefik-labs or @traefik_maintainers after 3 weeks can spare a thought and try to answer?

Its been 3 months I posted this. Can anybody from stuff bother please?