pi-hole

DIY HOME SERVER 2021 – Software – PI-HOLE

1. DIY HOME SERVER - PI-HOLE container preparation

This guide is my implementation of installing Pi-hole Network-wide Ad Blocking.

A common way to install applications in Proxmox is to use Docker containers. But I like to do things a bit different. Let’s install Pi-hole in a Ubuntu LXC.

In Proxmox, select local (storage) → CT Templates → Templates.

In the dropdown, select the latest Ubuntu LTS (.04) template and click the Download button.

Click the Create CT button to create a new LXC.

On the General tab, specify the container name an set the password for the root user.

Click Next.

On the Template tab, select your local storage.

Then select the latest Ubuntu CT Template.

Click Next.

On the Root Disk tab, set a 4 GB Disk size.

Click Next.

On the CPU tab, there’s nothing to change.

Click Next.

On the Memory tab, there’s nothing to change.

Click Next.

On the Network tab, set a static IP address and specify the Gateway.

Click Next.

On the DNS tab, there’s nothing to change.

Click Next.

On the Confirm tab, check your settings.

Click Finish.

The container will be installed.

Select the container and click Options → Start at boot → Edit.

Set the Start at boot option and click OK.

2. DIY HOME SERVER - PI-HOLE installation

Start the newly created Pi-hole container.

Select the Console.

Log in as user root with the password set during the container creation.

Enter the following command sequences :
apt update && apt upgrade -y
apt-get install curl -y
adduser piuser
usermod -aG sudo piuser

Enter the following command :

curl -sSL https://install.pi-hole.net | bash
Just follow the installation procedure. Select Cloudflare as your Upstream DNS Provider. Leave all other options on their defaults. After installation finishes, take note of the URL for the web interface and its password. If you want to change this password, use :
pihole -a -p

3. DIY HOME SERVER - PI-HOLE configuration

Go to your web browser and enter the address of your Pi-hole followed by /admin.

Enter the password and log in.

In pi-hole, select Settings → Adlist → group management pages.

In the Address field, enter
https://dbl.oisd.nl/
and click the Add button.

Then open another browser tab en go to https://firebog.net/.

Do the same with all URLs except those that have a strike through. You can select all items in the bulleted list and copy them in one time into the Address field. Then click the Add button.

Do the same for each part :

  • Suspicious Lists
  • Advertising Lists
  • Tracking & Telemetry Lists
  • Malicious Lists
  • Other Lists

 

After adding all items, click on the online link in the first hint.

Click the Update button.

Wait untill all items are imported.

Then check the dashboard.

Your Pi-hole is now up and running.

Don’t forget to set the DNS settings on your local network DHCP server (router or dedicated DHCP server) so Pi-hole will automatically be used by any DHCP network client.

Set :

  • DNS 1 : your Pi-hole
  • DNS 2 : 1.1.1.1 (Cloudflare DNS)
  • DNS 3 : 8.8.8.8 (Google DNS)

That will assure proper DNS translation even when your Pi-Hole is not running.

4. DIY HOME SERVER - PI-HOLE DNS configuration

Go to your web browser and enter the address of your Pi-hole followed by /admin.

Enter the password and log in.

In the left hand menu, click Settings.

Then select the DNS tab and scroll down.

In the Conditional forwarding section, enable Conditional forwarding and specify :
  • your LAN subnet
  • your router IP address
  • your Local Domain name (optional)
Click the Save button.
From now on pi-hole will display hostnames instead of IP addresses.

5. DIY HOME SERVER - PI-HOLE updating

Open up a ssh session to the Pi-hole server, either from your computers terminal C:\>ssh piuser@xxx.xxx.xxx.xxx or use Putty.

Log in as user piuser and enter the password.

Enter the following command : 

pihole -up

Enter the password (again).

Type :

exit

to quit the session.

In the next episode, we’ll install the HEIMDALL Application Dashboard as a LXC container.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.