How to use whitelisting per container

一个人想着一个人 提交于 2019-12-11 01:16:20

问题


I'm using traefik in docker-mode. It's retrieving most config (acme.domains, enabled, frontend-rules,...) from the docker containers.

Currently all containers are reachable from the WWW (0.0.0.0). I'm wondering how to restrict the access to a single container to some dedicated ip-addresses.

The docker labels of the private web-service would look like:

labels:
  - "traefik.enable=true"
  - "traefik.backend='private container'"
  - "traefik.whitelistSourceRange=192.168.1.0/24"

The whitelisted ip is in this case of course just an example. This could be any private ip-subnet.

Maybe it's possible to set a frontend-rule which bases on "client.ip"?

Thanks for your help!

来源:https://stackoverflow.com/questions/45301684/how-to-use-whitelisting-per-container

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!