IllustratorsLeak
CraftComputing
CraftComputing

patreon


PiHole as a Recursive DNS Server Tutorial

Pi-Hole is an awesome service to run in your house. It keeps ads from loading on every device, and will run on any Raspberry Pi, Docker container or virtual machine you'd like. But did you know it can do SO much more than just block ads? You can also completely bypass 3rd party DNS servers like 8.8.8.8, 1.1.1.1, 208.67. 222.222, or the ones ran by your ISP.

But first... What am I drinking???

Freigeist Bierkultur's Aufschneider, a 'Hoppy German-style Hefeweizen Ale'. This reminded me a lot of a Radler... you know, a lager mixed with grapefruit soda? But think of a Hefe mixed with a Pale Ale. It's better than it sounds, but it's also neither a Pale Ale, nor a Hefe. Not bad, but not for me.


Installation Steps

Install Ubuntu Server 20.04 (https://ubuntu.com/download/server)

Install Pi-Hole - sudo curl -sSL https://install.pi-hole.net | bash

Set the Web Admin Password - pihole -a -p [password]

Install Unbound DNS - sudo apt install unbound

Create Unbound Configuration File - sudo nano /etc/unbound/unbound.conf.d/pi-hole.conf

Copy example config - https://docs.pi-hole.net/guides/dns/unbound/

Restart Unbound to apply Configuration - sudo service unbound restart

Disable Forwarding DNS in PiHole

Set Custom DNS in PiHole - 127.0.0.1#5335


And you're done! Bonus points for sending all DNS traffic through a VPN Gateway to encrypt all outbound requests - https://youtu.be/xFficDCEv3c


Find the parts I recommend on my Amazon store: https://www.amazon.com/shop/craftcomputing

Follow me on Twitter @CraftComputing

PiHole as a Recursive DNS Server Tutorial

Comments

Great tutorial, but have a question about the last part of the config. setup. Are these details different if you use other IP addressing? ( # Ensure privacy of local IP ranges private-address: 192.168.0.0/16 private-address: 169.254.0.0/16 private-address: 172.16.0.0/12 private-address: 10.0.0.0/8 private-address: fd00::/8 private-address: fe80::/10)

Roark Sandberg


More Creators