1

I am using Pihole to block ads across my network and just does not seem to work on ubuntu, tried both my laptop and desktop.

Attached are screenshots of a windows machine an android device and the ubuntu laptop all showing dns configs and forbes website and they are all blocked except the ubuntu one. no ads are blocked on it.

1
  • 3
    I'm not sure enough to make a complete answer but this might be a dns caching issue on the client? – Jorge Castro Jan 7 '17 at 18:03
0

Your DNSMasq might be causing the DNS from the pihole to be overlooked.

Try disabling DNSMasq by commenting out the line dns=dnsmasq in /etc/NetworkManager/NetworkManager.conf

You can comment it out by running the following line:

sudo bash -c 'sed -i "s/dns=/#dns=/" /etc/NetworkManager/NetworkManager.conf'

Then you can check if the change took effect:

:~$ cat /etc/NetworkManager/NetworkManager.conf 
[main]
plugins=ifupdown,keyfile,ofono
#dns=dnsmasq

[ifupdown]
managed=false

Then reboot the system for changes to take effect. After the reboot, check with nslookup to see that DNSMasq no longer is serving DNS. If the Server: line shows 127.0.1.1, that means that DNSMasq is still controlling DNS of the system.

:~$ nslookup google.com
Server:     10.0.0.1
Address:    10.0.0.1#53

Non-authoritative answer:
Name:   google.com
Address: 216.58.217.14

As you can see, my router IP is 10.0.0.1 which means that DNS is controlled by my router instead of DNSMasq.

Hope this helps!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.