I am running dockerized pihole and dockerized wireguard. wireguard seems to be working fine with pihole. But I noticed that I get a lot of single dot DNS root zone NS lookup queries in logs only if wireguard container is running.
Do you still see N/A as reply today?
Because if I query this, there is a whole answer section. Maybe you see this amount of requests because your client could not get any valid answer....
rockpi@rockpi-4b:~$ dig NS . @1.1.1.1
; <<>> DiG 9.11.5-P4-5.1+deb10u7-Debian <<>> NS . @1.1.1.1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 61874
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 13, AUTHORITY: 0, ADDITIONAL: 27
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;. IN NS
;; ANSWER SECTION:
. 516769 IN NS a.root-servers.net.
. 516769 IN NS b.root-servers.net.
. 516769 IN NS c.root-servers.net.
. 516769 IN NS d.root-servers.net.
. 516769 IN NS e.root-servers.net.
. 516769 IN NS f.root-servers.net.
. 516769 IN NS g.root-servers.net.
. 516769 IN NS h.root-servers.net.
. 516769 IN NS i.root-servers.net.
. 516769 IN NS j.root-servers.net.
. 516769 IN NS k.root-servers.net.
. 516769 IN NS l.root-servers.net.
. 516769 IN NS m.root-servers.net.
;; ADDITIONAL SECTION:
a.root-servers.net. 516769 IN A 198.41.0.4
a.root-servers.net. 516769 IN AAAA 2001:503:ba3e::2:30
b.root-servers.net. 516769 IN A 199.9.14.201
b.root-servers.net. 516769 IN AAAA 2001:500:200::b
c.root-servers.net. 516769 IN A 192.33.4.12
c.root-servers.net. 516769 IN AAAA 2001:500:2::c
d.root-servers.net. 516769 IN A 199.7.91.13
d.root-servers.net. 516769 IN AAAA 2001:500:2d::d
e.root-servers.net. 516769 IN A 192.203.230.10
e.root-servers.net. 516769 IN AAAA 2001:500:a8::e
f.root-servers.net. 516769 IN A 192.5.5.241
f.root-servers.net. 516769 IN AAAA 2001:500:2f::f
g.root-servers.net. 516769 IN A 192.112.36.4
g.root-servers.net. 516769 IN AAAA 2001:500:12::d0d
h.root-servers.net. 516769 IN A 198.97.190.53
h.root-servers.net. 516769 IN AAAA 2001:500:1::53
i.root-servers.net. 516769 IN A 192.36.148.17
i.root-servers.net. 516769 IN AAAA 2001:7fe::53
j.root-servers.net. 516769 IN A 192.58.128.30
j.root-servers.net. 516769 IN AAAA 2001:503:c27::2:30
k.root-servers.net. 516769 IN A 193.0.14.129
k.root-servers.net. 516769 IN AAAA 2001:7fd::1
l.root-servers.net. 516769 IN A 199.7.83.42
l.root-servers.net. 516769 IN AAAA 2001:500:9f::42
m.root-servers.net. 516769 IN A 202.12.27.33
m.root-servers.net. 516769 IN AAAA 2001:dc3::35
;; Query time: 13 msec
;; SERVER: 1.1.1.1#53(1.1.1.1)
;; WHEN: Sun Sep 18 19:56:16 CEST 2022
;; MSG SIZE rcvd: 811
Ow now my above reply was moved to this thread, above most likely doesnt apply for your situation as they seem not to be ANY queries (from the screenshots) that are mostly used for DDoS-ing.
But instead they are NS queries.
But still those NS replies are big enough to be used for DDoS-ing:
EDIT: Who/what is that 172.18.0.1 IP thats making those queries?
I see NODATA as reply today. This is the latest screenshot after starting containerized wireguard (running on same pi that is hosting containerized pihole )
Most likely a process inside the Wireguard container or a VPN connected client is generating these queries.
Most likely its bombarding your DNS because there is no proper answer (NODATA).
Is 192.168.50.1 your router?
Whats output for below one run on a client (Windows/MacOS/Linux)?
Something weird going on if the query needs to switch from UDP to TCP to successfully get a reply.
The answer (239 bytes) should fit in a single UDP packet of default MTU size of 1500 bytes without truncating.
Below you see I can get an answer via UDP with the +notcp argument (and size 239 bytes):
pi@ph5b:~ $ dig +noall +answer +stats +notcp @localhost . ns
. 65570 IN NS i.root-servers.net.
. 65570 IN NS j.root-servers.net.
. 65570 IN NS k.root-servers.net.
. 65570 IN NS l.root-servers.net.
. 65570 IN NS m.root-servers.net.
. 65570 IN NS a.root-servers.net.
. 65570 IN NS b.root-servers.net.
. 65570 IN NS c.root-servers.net.
. 65570 IN NS d.root-servers.net.
. 65570 IN NS e.root-servers.net.
. 65570 IN NS f.root-servers.net.
. 65570 IN NS g.root-servers.net.
. 65570 IN NS h.root-servers.net.
;; Query time: 9 msec
;; SERVER: ::1#53(::1)
;; WHEN: Mon Sep 19 19:28:15 CEST 2022
;; MSG SIZE rcvd: 239
I suspect 53 UDP not coming through at some point in the chain.
Am not sure if this is related to the issue but ...
make sure that for the Pi-hole Docker container both ports 53 TCP & UDP are port forwarded:
ports:
- "53:53/tcp"
- "53:53/udp"
- "67:67/udp" # Only required if you are using Pi-hole as your DHCP server
- "80:80/tcp"
And also make sure that no firewall is blocking 53 UDP & TCP.
make sure that for the Pi-hole Docker container both ports 53 TCP & UDP are port forwarded:
Yes both ports 53 TCP & UDP are forwarded.
My docker-compose
version: "3"
# More info at https://github.com/pi-hole/docker-pi-hole/ and https://docs.pi-hole.net/
services:
pihole:
container_name: pihole
image: jacklul/pihole:latest
ports:
- "53:53/tcp"
- "53:53/udp"
- "67:67/udp"
- "8080:80/tcp"
environment:
TZ: 'Asia/Karachi'
ADMIN_EMAIL: myemail@something.com
WEBPASSWORD: 'somepassword'
WEBTHEME: 'default-dark'
PIHOLE_DNS_: '192.168.50.1'
FTLCONF_REPLY_ADDR4: '<v4addressofpi>'
FTLCONF_REPLY_ADDR6: '<v6addressofpi>'
# Volumes store your data between container upgrades
volumes:
- './etc-pihole/:/etc/pihole/'
- './etc-dnsmasq.d/:/etc/dnsmasq.d/'
- './etc-pihole-updatelists/:/etc/pihole-updatelists/'
#dns:
#- 192.168.50.1
#- 1.1.1.1
# Recommended but not required (DHCP needs NET_ADMIN)
# https://github.com/pi-hole/docker-pi-hole#note-on-capabilities
# cap_add:
# - NET_ADMIN
restart: unless-stopped
Also note that I am using DoT Cloudflare Zero Trust DNS (configured in my router). But note that issue was also occurring with public cloudflare's DNS that I was using while posting this question last year.
Let me search how to fix that MTU issue. I remember that pihole was showing some MTU related warnings some time ago but I couldn't find those warnings now.
That could be the other reason why it gets truncated switching to TCP.
If a box somewhere upstream only allows very small UDP packets, the query switches to fragmented TCP instead of UDP.
But thats highly unusual if this is happening already with a reply of only 239 bytes.
EDIT: Ow do you have a box that can run that dig command of mine with the +notcp argument against involved DNS IP's?
EDIT2: Can leave out the +noall +answer +stats arguments for a full reply.
Why do you want the router in the chain as upstream for Pi-hole?
I wanted to give DoT or DoH a try. Since pihole doesn't natively support DoT/DoH that's why some sort of software is required between pihole and upstream dns.
Why not choose any of the default upstream DNS providers via the webGUI?
I have also tried that infact at the time of posting this question I was using cloudflare from webGUI.
Yup UDP query to 1.1.1.1 is also truncating. Probably this has to do with my ISP or country level firewall