PiHole on Ubuntu 18 on Odroid Xu4

Netplan itself doesn't seem to be the root cause of the problem with Bionic / 18.04.
Out of the box ubuntu is no longer using dnsmasq (even on desktop installs), but using systemd-resolved, which binds to port 53, which is where the blocking problem for Pi-hole seems to be.

@mtarbox you can give this a try. It worked for me but no guarantees are offered.

These are the steps I went through to get pi-hole working for dns requests under Bionic, on a clean desktop install.

1 Set static IP using the network manager applet. (Some people had problems with this on Artful, but it seems to be working now).

2 Install curl ( yes really :frowning: )

sudo apt install curl

3 Install Pi-hole in the usual manner

curl -sSL https://install.pi-hole.net | bash

4 Stop systemd-resolved from binding to port 53, because that's where dnsmasq wants to be.

sudo nano /etc/systemd/resolved.conf

Change the final line
#DNSStubListener=Yes
to
DNSStubListener=No

5 Restart resolved

sudo systemctl restart systemd-resolved

6 Repair pihole settings (If installing Pi-hole until after the above then I guess this bit won't really be necessary, but assuming a residual install prior to the above then it is)

sudo pihole -r

Reboot for good measure

sudo shutdown -r now

And, on the system I tried, Pi-hole is working fine, not interfering with regular network access on the host, and correctly processing dns requests from other systems on the network.

Systems that have been upgraded, eg Xenial -> Bionic or more worryingly Precise or Trusty -> Bionic, may have a whole bunch of residual settings to mess things right up. Also although on desktop installs netplan uses Network-Manager, on server and cloud installs, netplan hands straight over to systemd. Ultimately it shouldn't matter, and won't matter, because the whole point of netplan is that one configuration file should work no matter the underlying system. But during this transitional stage it may complicate things.

I'll try the adjustments to on a completely clean install (prior to attempting to install pi-hole) when I get a moment and report back, but I suspect it will work ok, and wouldn't involve major changes to the installer.

2 Likes