Pi-Hole on Ubuntu 18.04.2

Found this, did you? I'd better begin, then. Ubuntu is installed, yes? Hardware or VM, that part is unimportant. 18.04.02 or better? Good, that is the version I used to write this. Before we get to Pi-hole, let's get that installation up to date. Author's note: This post was written after my issue was resolved. I have a propensity for misspelling, and thus refuse to claim any accuracy for the following instructions.
sudo apt update
Let that run it's course.
sudo apt upgrade
With that complete, I recommend grabbing the dnsmasq package before installing anything else. Do that with
sudo apt install dnsmasq
The most trouble I had was keeping the dns service responsive after restarting of my VM. Ubuntu's internal DNS Cache set in system-resolved kept interfering. To remedy that issue
sudo systemctl disable systemd-resolved.service
sudo systemctl stop systemd-resolved.service

sudo systemctl enable dnsmasq.service
sudo systemctl start dnsmasq.service
Find out if your dns service is running. (This helped me).
ss -4 -a
Looks like we've got a listening service, right? But when we test it
nslookup
google.ca
** server con't find google.ca: refused
Ah - I guess we need to modify the dnsmasq config file. Find and uncomment (remove the #) infront of the following lines:
no-resolv
no-poll
server=/localnet/192.168.0.1
Modify that last line to match at least one upstream and active dns server. You may remove the localnet or match it to your preferred dns search domain. Check again your results with nslookup. Can you resolv dns names now? Hopefully you can. I did. Pi-Hole pretty much is able to do the rest. Finish with
sudo curl -sSL https://install.pi-hole.net | bash
Be smart, make choices through to the end of the installation and restart your computer or VM and test again! After which, enjoy blocking those pesky internet advertisements. PS: Removing ads typically speeds up web browsing!
If you want, leave comment. I give warning: Can't guarantee I'll reply. I wish you luck!

Comments

Popular posts from this blog

5 into 1; Yet One for All

Finally! I found 'em!