What is the best practice of docker + ufw under Ubuntu

后端 未结 8 1367
旧巷少年郎
旧巷少年郎 2020-11-27 10:14

I just tried out Docker. It is awesome but seems not work nicely with ufw. By default, docker will manipulate the iptables a little bit. The outcome is not a bug but not wha

8条回答
  •  我在风中等你
    2020-11-27 10:58

    Not quite sure what your asking but from what I can gather you would like better control over who can access your apps running inside Docker? I have answered a similar question here to control traffic via a front end proxy rather than with IP tables Block external access to docker containers

    Hope this helps

    Dylan

    Edit

    With the above approach you can then use UFW to only allow incoming connections to port 80 (ie the proxy). This keeps any port exposure to a minimum with the added bonus that you can control traffic through a proxy configuration & DNS

提交回复
热议问题