menteb
February 5, 2021, 6:05am
1
Hey,
I'm looking for some help regarding Local DNS Records.
I set up a Local DNS Records with domain internal.lan
pointing to 192.168.1.2
which runs a webserver.
When, on the pi-hole, I then do a dig @127.0.0.1 -p 53 internal.lan
I get:
; <<>> DiG 9.16.11 <<>> @127.0.0.1 -p 53 internal.lan
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 26368
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;internal.lan. IN A
;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Fri Feb 05 08:03:41 EET 2021
;; MSG SIZE rcvd: 32
I cannot figure out why I do not get 192.168.1.2
in my records...
Any help appreciated.
Either Pi-hole is not listening on port 53 on that machine, or you have not applied your local DNS record.
Review Pi-hole's UI for DNS records, or verify cat /etc/pihole/custom.list
is showing the correct entry for internal.lan
.
And check whether Pi-hole is successfully binding to port 53:
sudo netstat -tulpn | grep "Proto\|:53 "
menteb
February 5, 2021, 11:20am
3
Thanks for the fast reply.
cat /etc/pihole/custom.list
outputs 192.168.1.2 internal.lan
The output of netstat:
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:53 0.0.0.0:* LISTEN 302/pihole-FTL
tcp6 0 0 :::53 :::* LISTEN 302/pihole-FTL
udp 0 0 0.0.0.0:53 0.0.0.0:* 302/pihole-FTL
udp6 0 0 :::53 :::* 302/pihole-FTL
Both outputs look ok, so you should receive an answer.
Run from a client in your network (i.e. not your Pi-hole machine), what's the outpout of:
nslookup internal.lan
menteb
February 5, 2021, 11:34am
5
Really appreciate the help!
nslookup internal.lan
gives me:
Server: 192.168.1.3
Address: 192.168.1.3#53
** server can't find internal.lan: : No answer
192.168.1.3 runs the pi-hole.
Maybe Pi-hole isn't aware of that configuration yet.
Restarting Pi-hole should fix that:
pihole restartdns
Veriify by running nslookup
from a client as well as your local dig
on your Pi-hole machine after that.
Please upload a debug log and post just the token generated by
pihole -d
allowing to upload when prompted, or do it through the Web interface:
Tools > Generate Debug Log
menteb
February 5, 2021, 12:01pm
9
I'm sorry. My install is on a virtual machine running Arch Linux.
ArchLinux distribution of Pi-hole is not supported by official project and this debug report CAN NOT be uploaded to their debug team.
I'll try to figure out another way of getting it to talk correctly
A final guess:
If answers would be missing not just for your custom domain, but for all DNS queries, then a firewall may interfere somewhere, either in the VM or the host system.
(If you'd only observed failures when looking up the domain from a client, it could have been your router applying DNS rebind protection. That's ruled out as common cause by your local dig
also lacking an answer. )
Other than that, I'm out of ideas what could be causing your issue.
menteb
February 5, 2021, 12:20pm
11
I will go over my firewall rules again, thanks for the tip.
Thanks for the time and help! Have a beautiful weekend!
1 Like
menteb
February 5, 2021, 1:18pm
12
=== SOLVED ===
On Arch Linux using:
I could get everything to work by simply creating /etc/dnsmasq.d/02-lan.conf
with content:
addn-hosts=/etc/pihole/custom.list
Followed by a systemctl restart pihole-FTL.service
and everything buzzes like a bee!
system
Closed
February 26, 2021, 1:19pm
13
This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.