Description
ufw-docker is a fix for a known problem on Ubuntu servers: Docker publishes container ports in a way that bypasses UFW, the firewall front end, so a port you have denied can still be reached from outside. The project explains that when a container is started with a port published on all addresses, such as 0.0.0.0:8080, the port can be reached even after you run ufw deny 8080. The author notes that a serious exposure of this kind can make an internal service visible to the public internet. Most online fixes disable Docker's iptables management, which also stops containers from reaching external networks, while others add rules to the UFW configuration that only cover one default network range and must be repeated for each new Docker network. The project aims for a solution that keeps Docker's own network management and still lets UFW control published ports. The repository is in English and Chinese, with a TL;DR that points to a solving guide. It explains how to revoke the original modifications, and it is published on GitHub as a free, open source tool. It is a security fix for server administrators, so the README is worth reading in full before you apply it to a production machine.…
Highlights
- Makes UFW rules apply to Docker published ports
- Keeps Docker's iptables management enabled
- Works with new Docker networks
- Instructions to revoke the change
- English and Chinese documentation
Ratings & Reviews
No ratings yet
Be the first to rate Ufw Docker.
People also visit
Ufw Docker Automated
Manage UFW (Uncomplicated Firewall) rules for Docker containers
Ufw Docker FAQ
What problem does it solve?
Docker can publish a container port in a way that bypasses UFW, so a port you deny in UFW can still be reached from outside.
Does it turn off Docker's iptables?
No. The project says it aims to fix the problem without disabling iptables, which many other fixes do.
Does it work with new Docker networks?
The project says the aim is a solution that does not need a separate rule for each new Docker network.
Is there a way to undo it?
Yes. The README has a section on how to revoke the original modifications.
Is it free?
Yes. It is an open source tool published on GitHub.
Should I test it first?
The README is worth reading in full before applying a firewall change to a production server.
What are the best Ufw Docker alternatives?
Popular alternatives to Ufw Docker include Whalewall, Ufw Docker Automated and Docker Fail2ban. See all Ufw Docker alternatives