Hello, I've noticed that my Pi-hole instance running in a docker container is getting DoSed by the host when I make a query to a domain in a custom dnsmasq list.
For example with this configuration in the dnsmasq.d
directory:
# 99-nginx-proxy-manager.conf
server=/domain.tld/10.1.0.140
and by running this command on my workstation:
#$ dig @10.1.0.140 test.domain.tld
; <<>> DiG 9.10.6 <<>> @10.1.0.140 test.domain.tld
; (1 server found)
;; global options: +cmd
;; connection timed out; no servers could be reached
I get this in the pihole.log
:
# pihole.log
Jul 19 20:46:04 dnsmasq[233]: query[A] test.domain.tld from 10.0.4.20
Jul 19 20:46:04 dnsmasq[233]: forwarded test.domain.tld to 10.1.0.140
Jul 19 20:46:04 dnsmasq[233]: query[A] test.domain.tld from 172.24.0.1
Jul 19 20:46:04 dnsmasq[233]: forwarded test.domain.tld to 10.1.0.140
Jul 19 20:46:04 dnsmasq[233]: query[A] test.domain.tld from 172.24.0.1
Jul 19 20:46:04 dnsmasq[233]: forwarded test.domain.tld to 10.1.0.140
Jul 19 20:46:04 dnsmasq[233]: query[A] test.domain.tld from 172.24.0.1
Jul 19 20:46:04 dnsmasq[233]: forwarded test.domain.tld to 10.1.0.140
Jul 19 20:46:04 dnsmasq[233]: query[A] test.domain.tld from 172.24.0.1
Jul 19 20:46:04 dnsmasq[233]: forwarded test.domain.tld to 10.1.0.140
... at least 5000 more ...
[2023-07-19 20:46:17.296 401M] WARNING: RAM shortage (/dev/shm) ahead: 94% is used (/dev/shm: 253.8MB used, 268.4MB total, FTL uses 253.8MB)
[2023-07-19 20:46:17.296 401M] Resizing "FTL-queries" from 253231104 to (4526080 * 56) == 253460480 (/dev/shm: 253.8MB used, 268.4MB total, FTL uses 253.8MB)
Here's a legend of IPs:
10.1.0.140
is the server running Pi-hole, but it also runs a reverse proxy and grafana172.24.0.1
should be the docker ip for the host10.0.4.20
is my workstation
As you can see every time I do a request to a subdomain of the domain setup in the dnsmasq config, the request from my workstation arrives to the Pi-hole, but then the host starts sending a lot of requests for the same subdomain until the FTL crashes, and my workstation never gets the response.
Can't figure out why this is happening, anyone has a clue?