▲
A
A
▼
安装Running Pi-Hole Ad-Blocker in a Proxmox VE VM
Creating the VM
Log into the Proxmox VE web UI
Select a storage from the left navigation pane to download the .iso to
Select ISO Images in the left sub-navigation pane
If running ProxMox 6, download the Raspberry Pi OS
Download
and upload it to the ProxMox ISO image library
If on ProxMox 7, click Download from URL and paste the download URL from above > Click Query URL > Click Download
Right click the ProxMox node name > Create VM
Type RaspberryPi in the name field > Next
Set the Type to Linux and select the Raspberry Pi OS iso
Leave the defaults on the System tab > Next
On the Hard Disk tab, set the Disk size to 16 > Next
Leave the defaults on the CPU tab > Next
On the Memory tab, set the Memory to 1024 > Next
Leave the defaults on the Network tab > Next
Verify the summary and click Finish
Right click the RaspberryPi VM in the left navigation pane > Start
Click console in the left sub-navigation menu
Select Graphical Install
Select a keyboard map > click Continue
Select Guided - use entire disk > click Continue
Click Continue, Continue, Continue
Select Yes to confirm writing the changes to disk > click Continue
Wait while Debian and the Raspberry Pi Desktop are installed
Select Yes to install GRUB on the master boot record > click Continue
Select /dev/sda > click Continue
Click Continue to reboot the VM
Click Next on the welcome dialog
Set the Country, Language and Time Zone > click Next
Enter and confirm a password for the pi user > click Next
Click Skip to updating software
Click Finish to reboot the VM and complete setup
Installing Updates and Pi-Hole
Click the Applications button > Accessories > Terminal
Run the following commands to install updates
sudo apt update
sudo apt upgrade -y
sudo apt clean
sudo reboot
Click the Applications button > Accessories > Terminal
Run the following command to install Pi-Hole
curl -sSL https://install.pi-hole.net | bash
Press Enter until the DNS selection is displayed
Select a DNS provider and press Enter
Press Enter through the rest of the Pi-Hole installer, selecting the defaults
Copy the randomly generated admin password (just in case)
Press Enter to complete the installation
Run the following command to change the Pi-Hole admin password
sudo pihole -a -p
Enter and confirm the new password
Click the Applications button > Internet > Chromium Web Browser
Navigate to http://DNSorIP/admin
Click Login
Authenticate with the admin password
Testing Pi-Hole
Right click the VM network connection > Wireless & Wired Network Settings
Select eth0 from the interface dropdown
Clear out the DNS servers and input the VM IP address
Click Apply
Click Devices > Network > Connect Network Adapter to disable networking
Click Devices > Network > Connect Network Adapter to re-enable networking
In Chromium, open a new tab and navigate to https://yahoo.com
Go back to the Pi-Hole tab and see that some DNS queries have been blocked
Setting Up From Windows Client
Click the Start button > Type control panel > press Enter
Click View By > Small Icons
Click Network and Sharing Center
Click Change adapter settings
Right click on the network connection > Properties
Select Internet Protocol Version 4 (TCP/IPv4) > Properties
Select the radio option next to Use the following DNS server addresses
Input the IP address of the Pi-Hole VM
Click OK on both of the open dialog windows
Right click the Start button > Command Prompt (Admin)
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/