Running Pi Hole Ad Blocker in a VirtualBox VM

Channel:
Subscribers:
14,500
Published on ● Video Link: https://www.youtube.com/watch?v=V6ujcri7Ay0



Duration: 8:04
34,539 views
476


#PiHole #VirtualBox #AdBlocker

Full steps can be found at https://i12bretro.github.io/tutorials/0107.html

Creating the VM
   01. Download Raspberry Pi OS  https://downloads.raspberrypi.org/rpd_x86_latest
   02. Launch Virtualbox
   03. Create a New VM by selecting Machine ≫ New
         Name: Raspberry Pi-Hole
         Machine Folder: C:\VMs
         Type: Linux
         Version: Debian (32-bit)
         Memory Size: 1024 MB
         Hard disk: Create a virtual hard disk now
   04. Click Create
   05. On the Create Virtual Hard Disk dialog
         Name the virtual disk image Raspberry Pi-Hole.vdi
         File size: 12-16 GB
         Hard disk file type: VDI
         Storage on physical hard disk: Dynamically Allocated
   06. Click Create
   07. Select the VM and Click Settings
   08. Select System ≫ Processor
   09. Give the VM at least 2 processors
   10. Select Display
   11. Slide the Video Memory to 128 MB
   12. Select Network
   13. Set the attached to dropdown to Bridged Adapter
   14. Select Storage
   15. Click on the CD-ROM drive
   16. Select the disc dropdown to the right ≫ Choose a virtual optical disc file...
   17. Browse to and select the Raspberry Pi desktop .iso file
   18. Click OK
   19. Make sure the Raspberry Pi-Hole VM is selected and click Start ≫ Normal
   20. Select Graphical Install
   21. Select a keyboard map ≫ click Continue
   22. Select Guided - use entire disk ≫ click Continue
   23. Click Continue, Continue, Continue
   24. Select Yes to confirm writing the changes to disk ≫ click Continue
   25. Wait while Debian and the Raspberry Pi Desktop are installed
   26. Select Yes to install GRUB on the master boot record ≫ click Continue
   27. Select /dev/sda ≫ click Continue
   28. Click Continue to reboot the VM
   29. Click Next on the welcome dialog
   30. Set the Country, Language and Time Zone ≫ click Next
   31. Enter and confirm a password for the pi user ≫ click Next
   32. Click Skip to updating software
   33. Click Finish to reboot the VM and complete setup
 
Installing Updates and Pi-Hole
   01. Click the Applications button ≫ Accessories ≫ Terminal
   02. Run the following commands to install updates
         sudo apt update
         sudo apt upgrade -y
         sudo apt clean
         sudo reboot now
   03. Select Devices ≫ Insert Guest Additions CD image...
   04. If the installation autoruns, select Run
   05. On the desktop, Right click on the Guest Additions disc ≫ Open in Terminal
   06. In the Terminal window run the following commands
         sudo sh ./VBoxLinuxAdditions.run
         sudo reboot now
   07. The VM will reboot
   08. Upon rebooting, you can now full screen the VM and the internal resolution will automatically change to match the window size
   09. Click the Applications button ≫ Accessories ≫ Terminal
   10. Run the following command to install Pi-Hole
         curl -sSL https://install.pi-hole.net | bash
   11. Press Enter until the DNS selection is displayed
   12. Select a DNS provider and press Enter
   13. Press Enter through the rest of the Pi-Hole installer, selecting the defaults
   14. Copy the randomly generated admin password (just in case)
   15. Press Enter to complete the installation
   16. Run the following command to change the Pi-Hole admin password
         sudo pihole -a -p
   17. Enter and confirm the new password
   18. Click the Applications button ≫ Internet ≫ Chromium Web Browser
   19. Navigate to http://DNSorIP/admin
   20. Click Login
   21. Authenticate with the admin password
 
Testing Pi-Hole
   01. Right click the VM network connection ≫ Wireless & Wired Network Settings
   02. Select eth0 from the interface dropdown
   03. Clear out the DNS servers and input the VM IP address
   04. Click Apply
   05. Click Devices ≫ Network ≫ Connect Network Adapter to disable networking
   06. Click Devices ≫ Network ≫ Connect Network Adapter to re-enable networking
   07. In Chromium, open a new tab and navigate to https://yahoo.com
   08. Go back to the Pi-Hole tab and see that some DNS queries have been blocked
 
Setting Up From Windows Client
   01. Click the Start button ≫ Type control panel ≫ press Enter
   02. Click View By ≫ Small Icons
   03. Click Network and Sharing Center
   04. Click Change adapter settings
   05. Right click on the network connection ≫ Properties
   06. Select Internet Protocol Version 4 (TCP/IPv4) ≫ Properties
   07. Select the radio option next to Use the following DNS server addresses
   08. Input the IP address of the Pi-Hole VM
   09. Click OK on both of the open dialog windows
   10. Right click the Start button ≫ Command Prompt (Admin)


....Full steps can be found on GitHub [link at the top]


### Connect with me and others ###
★ Discord: https://discord.com/invite/EzenvmSHW8
★ Reddit: https://reddit.com/r/i12bretro
★ Twitter: https://twitter.com/i12bretro







Tags:
Ad
Ad Blocker
Ad Blocking
Block
DNS
DNS Ad Blocking
Debian
FOSS
Free Open-Source Software
Free Software
Home Lab
Home Lab Ideas
How To
Hypervisor
Install Guide
Install Pi-Hole On Debian
Network Wide Ad Blocking
Networking
Open Source
Open-Source
Pi-Hole
Pi-Hole Installation Guide
PiHole
Raspberry Pi OS
Raspberry Pi VirtualBox
Raspbian
Self-Hosted
Tutorial
VM
Virtual Machine
VirtualBox
VirtualBox VM
Web Based
i12bretro