What is the best practice of docker + ufw under Ubuntu

后端 未结 8 1352
旧巷少年郎
旧巷少年郎 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条回答
  •  萌比男神i
    2020-11-27 11:06

    Not saying solutions here are wrong, but they look a bit "terrifying" and error-prune for someone looking for a quick one-step instruction. I came with this problem recently as well, have read all the similar answers online, and have not found anything quick & clear at the time of writing. Surprisingly, my alternative solution is easy to comprehend and manage, and it works: just implement your firewall outside your host machine.

    • Digital Ocean has stunning Firewalls for zero extra cost, WYSIWYG style.
    • AWS offers Security Groups
    • etc.

    Treating Firewall as first-class citizen seems to have a lot of benefits.

提交回复
热议问题