Running Pi-Hole Ad-Blocker in a Proxmox VE VM

Creating the VM

  1. Log into the Proxmox VE web UI
  2. Select a storage from the left navigation pane to download the .iso to
  3. Select ISO Images in the left sub-navigation pane
  4. If running ProxMox 6, download the Raspberry Pi OS Download and upload it to the ProxMox ISO image library
  5. If on ProxMox 7, click Download from URL and paste the download URL from above > Click Query URL > Click Download
  6. Right click the ProxMox node name > Create VM
  7. Type RaspberryPi in the name field > Next
  8. Set the Type to Linux and select the Raspberry Pi OS iso
  9. Leave the defaults on the System tab > Next
  10. On the Hard Disk tab, set the Disk size to 16 > Next
  11. Leave the defaults on the CPU tab > Next
  12. On the Memory tab, set the Memory to 1024 > Next
  13. Leave the defaults on the Network tab > Next
  14. Verify the summary and click Finish
  15. Right click the RaspberryPi VM in the left navigation pane > Start
  16. Click console in the left sub-navigation menu
  17. Select Graphical Install
  18. Select a keyboard map > click Continue
  19. Select Guided - use entire disk > click Continue
  20. Click Continue, Continue, Continue
  21. Select Yes to confirm writing the changes to disk > click Continue
  22. Wait while Debian and the Raspberry Pi Desktop are installed
  23. Select Yes to install GRUB on the master boot record > click Continue
  24. Select /dev/sda > click Continue
  25. Click Continue to reboot the VM
  26. Click Next on the welcome dialog
  27. Set the Country, Language and Time Zone > click Next
  28. Enter and confirm a password for the pi user > click Next
  29. Click Skip to updating software
  30. Click Finish to reboot the VM and complete setup

Installing Updates and Pi-Hole

  1. Click the Applications button > Accessories > Terminal
  2. Run the following commands to install updates
    sudo apt update
    sudo apt upgrade -y
    sudo apt clean
    sudo reboot
  3. Click the Applications button > Accessories > Terminal
  4. Run the following command to install Pi-Hole
    curl -sSL https://install.pi-hole.net | bash
  5. Press Enter until the DNS selection is displayed
  6. Select a DNS provider and press Enter
  7. Press Enter through the rest of the Pi-Hole installer, selecting the defaults
  8. Copy the randomly generated admin password (just in case)
  9. Press Enter to complete the installation
  10. Run the following command to change the Pi-Hole admin password
    sudo pihole -a -p
  11. Enter and confirm the new password
  12. Click the Applications button > Internet > Chromium Web Browser
  13. Navigate to http://DNSorIP/admin
  14. Click Login
  15. Authenticate with the admin password

Testing Pi-Hole

  1. Right click the VM network connection > Wireless & Wired Network Settings
  2. Select eth0 from the interface dropdown
  3. Clear out the DNS servers and input the VM IP address
  4. Click Apply
  5. Click Devices > Network > Connect Network Adapter to disable networking
  6. Click Devices > Network > Connect Network Adapter to re-enable networking
  7. In Chromium, open a new tab and navigate to https://yahoo.com
  8. Go back to the Pi-Hole tab and see that some DNS queries have been blocked

Setting Up From Windows Client

  1. Click the Start button > Type control panel > press Enter
  2. Click View By > Small Icons
  3. Click Network and Sharing Center
  4. Click Change adapter settings
  5. Right click on the network connection > Properties
  6. Select Internet Protocol Version 4 (TCP/IPv4) > Properties
  7. Select the radio option next to Use the following DNS server addresses
  8. Input the IP address of the Pi-Hole VM
  9. Click OK on both of the open dialog windows
  10. Right click the Start button > Command Prompt (Admin)
  11. Type the following commands to flush your DNS cache and restart the network connections (note: your network connection will drop if running the commands on a remote machine)
    ipconfig /flushdns
    ipconfig /release
    ipconfig /renew

More on Pi-Hole https://pi-hole.net/