No localhost name resolution when Pi-Hole running


Please follow the below template, it will help us to help you!

Expected Behaviour:

I should be able to resolve names locally on my server

Actual Behaviour:

I have no resolution unless I stop “pihole-FTL”, then I can resolve names on localhost…

Debug Token:

Can’t upload

Bash History:
1 clear
2 cd /
3 clear
4 curl -sSL | bash
5 clear
6 sudo nano /etc/hostname /etc/hosts
7 service networking restart
8 reboot
9 sudo nano /etc/hostname /etc/hosts
10 nano /etc/hostname
11 hostname
12 nano /etc/hostname
13 hostnamectl set-hostname
14 hostname
15 nano /etc/hosts
16 sudo apt-get install iptables iptables-persistent
17 dig
18 service pihole-FTL stop
19 dig
20 clear
21 dig
22 clear
23 dig
24 clear
25 hostname -F
26 hostname
27 hostname -F
28 clear
29 dig
30 clear
31 nano /etc/dnsmasq.conf
32 service pihole-FTL restart
33 fig
34 dig
35 clear
36 nano /etc/systemd/resolved.conf
37 service systemd-resolved restart
38 dig
39 nano /etc/NetworkManager/NetworkManager.conf
40 sudo systemctl reload-or-restart NetworkManager
41 sudo systemctl stop dnsmasq
42 sudo systemctl restart pihole-FTL.service
43 sudo apt remove dnsmasq
44 clear
45 history
Also, it receives external requests but won’t reply


I fixed it: Just removed /etc/resolv.conf and did a service networking restart

Google Cloud messes with my files…


Not working. This is Ubuntu 16.04 LTS on Google Cloud Compute Engine.


Make sure you are only using localhost ( for DNS. This is usually configured in /etc/resolv.conf.


My Configuration File: Screen%20Shot%205

What I did after that: service networking reload

Resolution now works again, but it will then stop moments later… (1 min)


That sounds like some other tool is rewriting the file, or you need to change the DNS in a different place. Is there documentation on that for Google Cloud? I suggest looking through that.


I’ve tried. I will look a little deeper. I think there is a custom service Google is running on the system to overwrite those files. Let me take a look, and I’ll get back to you.


result of ps aux | grep 'google':


I looked and tried. I just gave up on Ubuntu 16.04. I’ve tested my current configuration from 16.04 and tried it on Debian 9 and it works perfectly!



This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.