Can't change DNS server to Pi-Hole
Pi-Hole (6.0.6) installed on Debian 12 at 192.168.1.14 (static ip). Confirmed working with `nslookup google.com 192.168.1.14`.
On the Archer C80 Network > Internet > Advanced Settings page, if I select "Use the following DNS address" and enter 192.168.1.14 as Primary DNS and leave 0.0.0.0 as optional Secondary DNS, I get: "Invalid Primary DNS Server. Please enter another one."
Why is this happening?
Thanks.
- Copy Link
- Subscribe
- Bookmark
- Report Inappropriate Content
Hi,
The settings in the menu "Advanced" -> "Network" -> "Internet" relate to the network that is connected to the router's WAN port.
If you have the Pi-Hole connected to your router's LAN network, then all you can do is to enter it's IP address in the "DNS" field(s) under "Advanced" -> "Network" -> "DHCP Server".
Client devices on the router's local network that obtain their IP configuration via DHCP will then be assigned that DNS server.
- Copy Link
- Report Inappropriate Content
Thank you for reporting your issue to our community.
Please go to the DHCP page to modify the DNS, and then fill in a meaningful DNS such as 1.1.1.1 as the secondary DNS.
Thank you.
- Copy Link
- Report Inappropriate Content
@trivial_factor Thank you. Does this mean I have to enable DHCP server in Pihole and reassigned all static IPs (already done so in the C80)?
- Copy Link
- Report Inappropriate Content
As long as you have DNS setup correctly on your router, you don't need to modify the settings.
- Copy Link
- Report Inappropriate Content
@trivial_factor OK, got that working. Thanks a lot for your support.
- Copy Link
- Report Inappropriate Content
@trivial_factor Well it's more complicated than that. The reason I installed Pi-Hole in the first place was to try and understand why my devices were not resolving my domain name when connected inside the LAN. They *do* connect properly if I access the network through a hotspot.
Some tests I did:
Device inside LAN (192.168.1.5 is my server running Pi-Hole):
> cat /etc/resolv.conf nameserver 192.168.1.5 nameserver 192.168.1.1 > scutil --dns DNS configuration resolver #1 nameserver[0] : 192.168.1.5 nameserver[1] : 192.168.1.1 if_index : 11 (en0) flags : Request A records reach : 0x00020002 (Reachable,Directly Reachable Address) > nslookup subdomain.mydomain Server: 192.168.1.5 Address: 192.168.1.5#53
ping mydomain -> OK nc -zv 192.168.1.5 22 -> succeeds nc -zv mydomain 22 -> *** fails *** (as do all other requests, 80, 443...) *** dig mydomain +short -> 192.168.1.5
From outside the LAN (hotspot):
> cat /etc/resolv.conf nameserver fe80::cd:feff:fe6b:5c64%en0 nameserver 172.20.10.1 > scutil --dns DNS configuration resolver #1 nameserver[0] : fe80::cd:feff:fe6b:5c64%en0 nameserver[1] : 172.20.10.1 if_index : 11 (en0) flags : Request A records, Request AAAA records reach : 0x00020002 (Reachable,Directly Reachable Address) > nslookup subdomain.mydomain Server: fe80::cd:feff:fe6b:5c64%11 Address: fe80::cd:feff:fe6b:5c64%11#53 Non-authoritative answer: subdomain.mydomain canonical name = mydomain. Name: mydomain Address: my public ip address
ping mydomain -> OK nc -zv 192.168.1.5 22 -> fails (as expected) nc -zv mydomain 22 -> succeeds dig mydomain +short -> my.public.ip.address (as expected)
The only answer I get from ChatGPT is that my router doesn't support NAT loopback and that I should either edit /etc/hosts or add local DNS entries in Pi-Hole. But:
- I can't modify /etc/hosts on all connected devices.
- Adding local DNS entries in Pi-Hole doesn't seem to work.
To be clear : this problem is not related to Pi-Hole. I was having the same issues before installing Pi-Hole. I only installed Pi-Hole in order to try and resolve this issues, by having a local DNS server.
Is the C80 incompatible with "NAT loopback"? And how can I resolve this?
Please help. Thanks.
EDIT: ssh to public ip
Although the router forwards port 22 to the server, ssh to my public ip doesn't work either. It does work if I ssh to mydomain from a hotspot (outside the lan), or if I ssh to 192.168.1.5 from within the lan. What is causing this?
- Copy Link
- Report Inappropriate Content
Information
Helpful: 0
Views: 120
Replies: 6
Voters 0
No one has voted for it yet.