Finally tried with . Everything works flawlessly, but I realized as a nasty surprise that docker bypasses , so I could potentially open my DNS server to the world.

Even they are several and complicated lists of rules to make ufw catch this, luckily pihole developers created an option "settings→DNS→Allow only local requests" that only lets the local network query the server.

Oops, I was wrong, that only allows access from localhost and the docker subnet.

The solution comes directly from docker's documentation: there is a chain, DOCKER-USER, that can be used to filter local traffic:

iptables -I DOCKER-USER -i wlan0 ! -s 192.168.1.0/24 -j DROP

docs.docker.com/network/iptabl

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.