Frontend rule for source IP?

I have an application with a /admin endpoint that I only want to make available to internal IPs and have the rest of the application available from all IPs. My first attempt at this is below, which didn't seem to work. Is this possible? How would I do it? Running Traefik 1.7.8-0.

  traefik.admin.backend: myapp-admin
  traefik.admin.frontend.priority: 20
  traefik.admin.frontend.rule: Host:myapp.mydomain.com;PathPrefix:/admin
  traefik.admin.frontend.whitelist.sourceRange: 10.0.0.0/8,172.16.0.0/12
  traefik.app.backend: myapp
  traefik.app.frontend.priority: 10
  traefik.app.frontend.rule: Host:myapp.mydomain.com
  traefik.backend.buffering.retryExpression: IsNetworkError()
  traefik.backend.circuitbreaker.expression: NetworkErrorRatio() > 0.5
  traefik.backend.healthcheck.interval: 5s
  traefik.backend.healthcheck.path: /ping?traefik
  traefik.enable: "true"
  traefik.frontend.redirect.entryPoint: https
  traefik.frontend.redirect.permanent: "true"
  traefik.port: "80"
  traefik.tags: external

a capital L made all the difference...

traefik.admin.frontend.whiteList.sourceRange: 10.0.0.0/8,172.16.0.0/12

Are you seriously running Traefik v1.7? :scream:

Support ended Dec 31, 2021 (doc)

You should not use such an old version, it can contain known security issues and bugs.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.