Home Pi-hole on Orange Pi Zero2
Post
Cancel

Pi-hole on Orange Pi Zero2

Pi-hole is a Linux network-level advertisement and Internet tracker blocking application which acts as a DNS sinkhole and optionally a DHCP server, intended for use on a private network.

Installation

1
sudo apt update && sudo apt upgrade -y

Download the script and execute

1
sudo curl -sSL https://install.pi-hole.net | bash

Add the google dns (in my case… you can choose a different one) pihole1 yes….yes… yess.. yess…… like a default installation pihole2

Now press < OK > to finish, and then let change the password

1
pihole -a -p [password]

Next step we should install unbound and config. For more info here

1
sudo apt install unbound -y

Edit config file

1
sudo vim /etc/unbound/unbound.conf.d/pi-hole.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
server:
    verbosity: 0

	interface: 127.0.0.1
    port: 5335
    do-ip4: yes
    do-udp: yes
    do-tcp: yes

    # May be set to yes if you have IPv6 connectivity
    do-ip6: no

    # You want to leave this to no unless you have *native* IPv6. With 6to4 and
    # Terredo tunnels your web browser should favor IPv4 for the same reasons
    prefer-ip6: no

    # Trust glue only if it is within the server's authority
    harden-glue: yes

    # Require DNSSEC data for trust-anchored zones, if such data is absent, the zone becomes BOGUS
    harden-dnssec-stripped: yes

    # Don't use Capitalization randomization as it known to cause DNSSEC issues sometimes
    # see https://discourse.pi-hole.net/t/unbound-stubby-or-dnscrypt-proxy/9378 for further details
    use-caps-for-id: no


    edns-buffer-size: 1232

    # Perform prefetching of close to expired message cache entries
    # This only applies to domains that have been frequently queried
    prefetch: yes

    # One thread should be sufficient, can be increased on beefy machines. In reality for most users running on small networks or on a single machine, it should be unnecessary to seek performance enhancement by increasing num-threads above 1.
    num-threads: 1

    # Ensure kernel buffer is large enough to not lose messages in traffic spikes
    so-rcvbuf: 1m

    # Ensure privacy of local IP ranges
    private-address: 192.168.0.0/16
    private-address: 169.254.0.0/16
    private-address: 172.16.0.0/12
    private-address: 10.0.0.0/8
    private-address: fd00::/8
    private-address: fe80::/10

After config everything we have to restart unbound, and test.

1
2
sudo service unbound restart
dig pi-hole.net @127.0.0.1 -p 5335

Config the Pi-hole

Go to your Pi-hole console using your local ip address as a web link, and enter your password. On Pi-hole console go Settigs>DNS add you address and port ` 127.0.0.1#5335 on Custom 1(IPv4), and also unchecked your Upstream DNS Servers` . *Don’t forget to save

pihole3

Now we can use Pi-hole on phone, computer, router, smart tv…… Everywhere!!!!

This is the web site that you can find Block list FireBog

In this web site you can find a lot of list that can block many different type of websites. To be safe on your Pi-hole only add green web like . pihole8

Go to your Pi-hole dashboard and then adlists

pihole4

After you add all the links that you want go to your terminal execute this command line.

1
pihole -g

Now you have all the link in your Pi-Hole….

This is a after/before add links pihole5 pihole7

This post is licensed under CC BY 4.0 by the author.
Contents