Setup Pi-Hole in Azure

Pi-Hole is a network wide DNS sinkhole that can be setup on multiple software/hardware configurations. Originally, I was going down the path of setting up Pi-Hole on a Raspberry Pi 3, but decided to explore the Azure VM path based on some posts from others.

Below are the high level steps I followed to setup Pi-Hole on my home network.

1.Create a VM in Azure and keep track of the public IP. (I picked the Ubuntu 18.04 LTS version with 1 CPU and 1 GB of RAM.)

2. Create an inbound firewall rule to enable SSH traffic (i.e. TCP Port 22) from your home network

Home > Virtual machines > Connect to virtual machine > Networking

3. SSH to the VM and update the package database

sudo apt-get update

4. Install Pi-hole

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

5. Configure Pi-hole for your environment. Some suggested configuration options are below[2]

6. Create an inbound firewall rule to enable Web traffic (i.e. TCP Port 80, 443) from your home network

8. Confirm you can access the Admin page of Pi-Hole by going to <VM IP>

9. Create an inbound firewall rule to enable DNS traffic (i.e. TCP/UDP Port 53)

10. Update your home router’s DNS to point to the public IP of your VM by following instructions at How do I configure my devices to use Pi-hole as their DNS server?

11. Test that Pi-Hole is properly configured by visiting the Pi-Hole Ad Pages Test Page.

[1] Post Implementation Notes:

  • Under the VM, check Operations > Auto-shutdown to confirm the settings match the shutdown behavior of the VM you want
  • Under the VM, check Operations > Update Management to confirm the settings match the OS automatic update behavior you want

[2] Related Links:

The following blogs posts were extremely helpful with the steps required to setup Pi-Hole in Azure and modifying some Pi-Hole settings to work for most home needs.

Sky-Hole Revisited [Pi-Hole in a cloud VM for easy DNS-based ad-blocking]

A New PiHole in the Sky

Network-wide blocking of Ads, tracking cookies and popups

Work Ethic

Jason Fried on work ethic

Work ethic is about showing up, being on time, being reliable, doing what you say you’re going to do, being trustworthy, putting in a fair day’s work, respecting the work, respecting the customer, respecting the organization, respecting co-workers, not wasting time, not making work hard for other people, not creating unnecessary work for other people, not being a bottleneck, not faking work. Work ethic is about being a fundamentally good person that others can count on and enjoy working with.

Source: Work Ethic