IPAllowList limits allowed requests based on the client IP

hello world :wink:

i'm trying follow Traefik HTTP Middlewares IPAllowList - Traefik to limit client to a specific IP

labels that i use w/ my container:

$ grep -A8 labels docker-compose.yaml
    labels:
      - "traefik.docker.network=traefik_traefik"
      - "traefik.enable=true"
      - "traefik.http.middlewares.minio.ipallowlist.sourcerange=X.X.X.X"
      - "traefik.http.routers.minio.rule=Host(`X.X.X`)"
      - "traefik.http.routers.minio.entrypoints=websecure"
      - "traefik.http.routers.minio.service=minio@docker"
      - "traefik.http.routers.minio.tls.certresolver=myresolver"
      - "traefik.http.services.minio.loadbalancer.server.port=9001"
$

yet I'm still able to access same resource using out of range IP address as well.

Please advise)
Thanks in advance!

I believe I was missing following label:

      - "traefik.http.routers.minio.middlewares=minio"

I would think so, too. You need to create and assign the middleware.

It can get messy when router, service and middleware use the same name :wink:

1 Like

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