Skip to content

ufw-docker not stopping Docker from opening ports #125

@rickard1133

Description

@rickard1133

I do not get ufw-docker to work on both a Raspberry Pi (Debian 11) or a VPS (Debian 12).

This is what I do:

Install Docker without starting any containers
Stop Docker
Install ufw-docker
Restart UFW
Start Docker
Verify /etc/ufw/after.rules
Reboot server
Start containers using Portainer stacks (Docker Compose)

Containers are automatically accessible outside localhost

Taking Pi-Hole as an example, DNS is accessible, GUI is accessible and iptables lists this:
iptables -L | grep pi.hole
ACCEPT tcp -- anywhere pi.hole tcp dpt:domain
ACCEPT udp -- anywhere pi.hole udp dpt:domain
ACCEPT tcp -- anywhere pi.hole tcp dpt:http

This is not expected behaviour, and I do not know how to fix it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions