Skip to main content

Pi-hole on container in Proxmox

Login into Proxmox

Download Debian distro template for containers. For some reason it might be cancelled or disrupted. As we now, which one template is expecting to find, let's download that manually. Navigate to containers' templates storage, find suitable and hit [Download] button

Download task itself

Template downloaded

Script location:

https://community-scripts.org/scripts/pihole?id=pihole

curl https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/pihole.sh

Paste and execute, this will download a script and execute it on hypervisor:

Let's see what usis inside of this script

and invoke it's from the shell:shell, when confident:

bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/pihole.sh)"

First screen is regarding telemetry data, do you choice using [Tab], [Space], [Enter]:

Use 'Default Install'

Begin, this will look for Debian Linux distro (and if necessary download it):

Script will download container and do configuration of container

Now, when container is ready, Proxmox's script will invoke Pi-hole script (which is actual application installer)

Final question is about 'Unbound' service

Check in the browser the URL, which is indicated by installer.

http://10.77.81.110/admin

Configuration of Pi-hole is described in another page.

The only change we want to perform is to change IP address. Locate container, open it's network configuration, change from DHCP to STATIC and define desired IP address (remember do define CIDR mask).

Open container's shell , take a note of network address and perform restart

ip -br a
shutdown -r now

Verify after reboot again

Last thing, before go: verify that container has "Start on boot" tick box enabled. Thus, we shall be sure that DNS server will be started with hypervisor. That applies to all machines, which need to be started (such as main router :)

Next morning, after the first day of DNS traffic

With no filtering lists loads, DNS server serverd 54% of cached traffic to local clients. That is very good, which means, that local clients received DNS response earlier, rather then for original query.