Introduction

This blog entry summarizes the needed steps (may be not all) how to setup the popular Add-ware blocker Pi-Hole on the Turris Omnia appliance.

Prerequsites

  • Turris Omnia with OS version 3.7 or higher
  • At least completion of the initial setup (first run)

Container Setup

  • SSH into the box
  • Create a new lxc container:
1
lxc-create -t download -n pi-hole
  • When prompted, enter the following parameters: ubuntu xenial armv7
  • Configure a static IP address to be set as new DNS server in a further step:
1
2
3
4
5
vi /srv/lxc/pi-hole/config

# Append the following lines:
lxc.network.ipv4.ipv4 = <static ip address>/<mask bits>
lxc.network.ipv4.gateway = <router address>
  • Configure the container to be started automatically (after reboot):
1
2
3
4
5
6
vi /etc/config/lxc-auto

# Add or append the following lines
config container
        option name pi-hole
        option timeout 60
  • Start the newly created lxc container:
1
lxc-start -n pi-hole
  • Verify if the container is up and running:
1
lxc-info -n pi-hole

Pi-Hole container

Pi-Hole Setup

  • Attach to the container:
1
lxc-attach -n pi-hole
  • Install needed package:
1
apt install -y wget
  • Download the Pi-Hole installation script and run it:
1
2
wget -O basic-install.sh https://install.pi-hole.net
bash basic-install.sh
  • Follow the script’s interactive installation instructions (correct settings should be suggested by the installation assistant)
  • Set a password in order to login over the admin web console:
1
pihole -a -p somepasswordhere
  • As a first test, try to open the Pi-Hole URL http:///admin in a new browser window:

Pi-Hole container

Turris Setup

  • Login to LuCI
  • Go to Network interfaces > LAN > DHCP Server > DHCP Option and change IP to the pi-hole container’s static IP

Verification

  • Ensure your IP address lease has been renewed on the client from where you are connected to the Turris Omnia box (in order to use Pi-Hole as the DNS server)
  • Open the Pi-Hole Add-ware testing page in a new browser window: https://pi-hole.net/pages-to-test-ad-blocking-performance/
  • Check if the statistics/counters have changed:

Pi-Hole container