Hacker GitHub

← All repos

chaifeng/ufw-docker

View on GitHub ↗ ★ 6,846 Shell

To fix the Docker and UFW security flaw without disabling iptables

17 mentions on Hacker News by 17 people: 2 stories, 15 comments · first 2020-09-09 · latest 2026-05-05

Mentions per year 17 mentions · busiest year 2021 (5)
20082026
  1. I use UFW, and this config: github.com/chaifeng/ufw-docker The only modification is that I pin containers to an IPv4 address so I can limit the forward rule to that address.
  2. You might be interested in ufw-docker: https://github.com/chaifeng/ufw-docker
  3. …As far as I can tell, it does its job correctly. Is there another problem I am not aware of? [1] https://github.com/chaifeng/ufw-docker
  4. …ended up using UFW-Docker. It was fairly straightforward to incorporate into my startup scripts. https://github.com/chaifeng/ufw-docker
    comment by bshipp · 2024-01-02 · in Fail2ban Sucks (2020)
  5. [2016] A solution is known and detailed here: https://github.com/chaifeng/ufw-docker
    comment by forbiddenlake · 2023-08-16 · in Docker Overrules UFW
  6. This helps https://github.com/chaifeng/ufw-docker
    comment by alexey-salmin · 2023-07-27 · in DHCP is not blocked by ufw/iptables
  7. …does add iptables rules by default, which bypass other rules such as those you might set with ufw. https://github.com/chaifeng/ufw-docker has a good overview and ufw-specific solution (I use it on my rpi).
    comment by bananadonkey · 2023-01-22 · in Vikunja – Open-source, self-hostable to-do app
  8. see https://github.com/chaifeng/ufw-docker
    comment by ancieque · 2022-07-18 · in Docker Swarm Lowers the Shields
  9. …behavior is unintutivie but makes sense given how container networking works. If you use UFW read https://github.com/chaifeng/ufw-docker and follow the guide. Then configuring firewall rules to containers is as easy as - name: Open HTTPS…
  10. …non standard behavior, but the way the docker team simply washes their hands is incredible. https://github.com/chaifeng/ufw-docker/issues/31 https://news.ycombinator.com/item?id=22299693
  11. …providers like AWS, Hetzner etc all provide the feature to add firewall rules via their UI. [1] https://github.com/chaifeng/ufw-docker
  12. Here's the fix to prevent docker messing with ufw rules: https://github.com/chaifeng/ufw-docker
  13. …iptables manipulations or use ufw-docker as the author. More about that at ufw-docker documentation https://github.com/chaifeng/ufw-docker
  14. For UFW users, installing this will make docker compatible with the firewall. https://github.com/chaifeng/ufw-docker
    comment by CGamesPlay · 2020-10-15 · in Dockerfile Security Best Practices
  15. …dns resolver that is accessible to the outside, as Docker by default bypasses the firewall, see https://github.com/chaifeng/ufw-docker . I'm not quite sure about that, though, so I'd be happy to be corrected and learn more about how your…