No localhost name resolution when Pi-Hole running


#1

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 https://install.pi-hole.net | 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 dns.jpits.us
14 hostname
15 nano /etc/hosts
16 sudo apt-get install iptables iptables-persistent
17 dig google.com
18 service pihole-FTL stop
19 dig google.com
20 clear
21 dig google.com
22 clear
23 dig google.com
24 clear
25 hostname -F pokyp-test.com
26 hostname
27 hostname -F www.google.com
28 clear
29 dig www.google.com
30 clear
31 nano /etc/dnsmasq.conf
32 service pihole-FTL restart
33 fig gogole.com
34 dig google.com
35 clear
36 nano /etc/systemd/resolved.conf
37 service systemd-resolved restart
38 dig google.com
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


#2

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

Google Cloud messes with my files…


#3

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


#4

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


#5

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)


#6

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.


#7

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.


#8

result of ps aux | grep 'google':


#9

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!


Screen%20Shot%209