Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
pihole [2020/12/10 10:51] Stephane de Labrusse [Pihole] |
pihole [2022/02/15 19:30] (current) Stephane de Labrusse |
||
---|---|---|---|
Line 8: | Line 8: | ||
Pi-hole has the ability to block traditional website advertisements as well as advertisements in unconventional places, such as smart TVs and mobile operating system advertisements. | Pi-hole has the ability to block traditional website advertisements as well as advertisements in unconventional places, such as smart TVs and mobile operating system advertisements. | ||
- | nethserver-pihole relie on nethserver-docker, | + | nethserver-pihole relie on nethserver-docker, |
====Maintainer==== | ====Maintainer==== | ||
Line 20: | Line 20: | ||
yum install nethserver-pihole --enablerepo=stephdl | yum install nethserver-pihole --enablerepo=stephdl | ||
+ | |||
+ | ===aqua=== | ||
+ | if you have decided to use the '' | ||
+ | |||
+ | '' | ||
+ | |||
+ | <WRAP center round tip 60%> | ||
+ | The aqua network got a cons, the DNS requests are seen from the NethServer, you cannot know which host is initiating the request | ||
+ | </ | ||
+ | |||
+ | * We have to set the network of the pihole container, do: | ||
+ | |||
+ | < | ||
+ | config setprop pihole piholeNetwork aqua | ||
+ | </ | ||
+ | |||
+ | go to create the container, please jump to the next [[pihole# | ||
+ | |||
+ | Once the container is up | ||
+ | * Go to the cockpit dashboard, set the IP of the primary DNS server to the IP '' | ||
+ | * Then use NethServer as the DNS server of your network (by adding it manually in each host or by DHCP) | ||
+ | |||
===Macvlan=== | ===Macvlan=== | ||
- | if you have decided to use the `aeria network`, please jump to the next [[pihole# | + | if you have decided to use the '' |
Macvlan is particuliar network, this is the documentation for explanation, | Macvlan is particuliar network, this is the documentation for explanation, | ||
<WRAP center round tip 60%> | <WRAP center round tip 60%> | ||
- | You must have a bridge, here called | + | You must have a bridge, here called |
</ | </ | ||
- | ``` | + | |
+ | < | ||
config setprop | config setprop | ||
signal-event nethserver-docker-update | signal-event nethserver-docker-update | ||
- | ``` | + | </ |
- | - check macvlan is up : `docker network ls` | ||
- | - then assign `macvlan` to `piholeNetwork` and set the IP to `piholeMacVlanIP` (in macvlan range) | ||
- | ``` | + | - check macvlan is up : '' |
+ | - then assign '' | ||
+ | |||
+ | |||
+ | < | ||
config setprop pihole piholeNetwork macvlan piholeMacVlanIP 192.168.1.234 | config setprop pihole piholeNetwork macvlan piholeMacVlanIP 192.168.1.234 | ||
- | ``` | + | </ |
+ | |||
+ | go to create the container, please jump to the next [[pihole# | ||
=== Aeria === | === Aeria === | ||
- | if you have decided to use the `macvlan network`, please jump to the next [[pihole# | + | if you have decided to use the '' |
To create the AERIA network please review https:// | To create the AERIA network please review https:// | ||
<WRAP center round tip 60%> | <WRAP center round tip 60%> | ||
- | You must have a bridge, here called | + | You must have a bridge, here called |
</ | </ | ||
- | ``` | + | |
+ | < | ||
config setprop docker bridgeAeria br0 | config setprop docker bridgeAeria br0 | ||
signal-event nethserver-docker-update | signal-event nethserver-docker-update | ||
- | ``` | + | </ |
- | - check aeria is up : `docker network ls` | + | |
- | - then assign `aeria` to piholeNetwork | + | - check aeria is up : '' |
- | `config setprop pihole piholeNetwork aeria` | + | - then assign '' |
+ | |||
+ | '' | ||
+ | |||
+ | go to create the container, please jump to the next [[pihole# | ||
=== Create the container === | === Create the container === | ||
- | review the pihole conf : `config show pihole` | + | review the pihole conf : '' |
- | ``` | + | < |
pihole=configuration | pihole=configuration | ||
DNS1=8.8.8.8 | DNS1=8.8.8.8 | ||
DNS2=8.8.4.4 | DNS2=8.8.4.4 | ||
mac=00: | mac=00: | ||
+ | PhpMemoryLimit=512M | ||
password=admin | password=admin | ||
piholeMacVlanIP=192.168.1.234 | piholeMacVlanIP=192.168.1.234 | ||
piholeNetwork=macvlan | piholeNetwork=macvlan | ||
timezone=UTC | timezone=UTC | ||
- | ``` | + | </ |
- | - change the admin password (default is `admin`) | + | |
+ | - change the admin password (default is '' | ||
By default the password is admin, you should change it obviously, once created with a password, you must destroy the container, change the password and create it again. | By default the password is admin, you should change it obviously, once created with a password, you must destroy the container, change the password and create it again. | ||
- | `config setprop | + | < |
+ | config setprop | ||
+ | </ | ||
Line 90: | Line 127: | ||
If you want to filter porn, set DNS1 and DNS2 to | If you want to filter porn, set DNS1 and DNS2 to | ||
- | ``` | + | |
+ | < | ||
Family filter | Family filter | ||
DNS1=185.228.168.168 | DNS1=185.228.168.168 | ||
DNS2=185.228.169.168 | DNS2=185.228.169.168 | ||
- | ``` | + | |
- | ``` | + | |
Adult filter | Adult filter | ||
DNS1=185.228.168.10 | DNS1=185.228.168.10 | ||
DNS2=185.228.169.11 | DNS2=185.228.169.11 | ||
- | ``` | + | </ |
set DNS1 and DNS2 accordingly | set DNS1 and DNS2 accordingly | ||
- | ``` | + | |
+ | < | ||
config setprop pihole DNS1 185.228.168.168 DNS2 185.228.169.168 | config setprop pihole DNS1 185.228.168.168 DNS2 185.228.169.168 | ||
- | ``` | + | |
+ | </ | ||
or | or | ||
- | ``` | + | |
+ | < | ||
config setprop pihole DNS1 185.228.168.10 DNS2 185.228.169.11 | config setprop pihole DNS1 185.228.168.10 DNS2 185.228.169.11 | ||
- | ``` | + | </ |
- trigger the event to create the container | - trigger the event to create the container | ||
- | ``` | + | |
+ | < | ||
signal-event nethserver-pihole-update | signal-event nethserver-pihole-update | ||
- | ``` | + | </ |
- The time depends of your internet bandwith | - The time depends of your internet bandwith | ||
Line 120: | Line 162: | ||
- check docker pihole is up : | - check docker pihole is up : | ||
- | `docker ps` | + | '' |
- | `pihole status` | + | '' |
+ | === Modify the PHP CGI memory limit === | ||
+ | |||
+ | The php memory limit for CGI is set to 512M, this should be good but when you browse the long-term data graphs you might need to increase it | ||
+ | |||
+ | < | ||
+ | config setprop pihole PhpMemoryLimit 1024M | ||
+ | signal-event nethserver-pihole-update | ||
+ | pihole upgrade | ||
+ | </ | ||
==== Documentation ==== | ==== Documentation ==== | ||
Line 130: | Line 181: | ||
==== Where to start ==== | ==== Where to start ==== | ||
- | Once installed pihole is available at the ip of the container, to find it do `pihole ip` in the terminal, use the IP of the container in your browser, then log with the credential | + | * for '' |
+ | Once installed pihole is available at the ip of the container, to find it do '' | ||
+ | |||
+ | * for '' | ||
+ | Once installed pihole is available at the https:// | ||
====Making devices use Pi-hole==== | ====Making devices use Pi-hole==== | ||
Line 148: | Line 203: | ||
==== Pihole wrapper ==== | ==== Pihole wrapper ==== | ||
- | do `pihole` in your terminal to get help | + | do '' |
pihole facilities wrapper to docker command | pihole facilities wrapper to docker command | ||
Line 169: | Line 224: | ||
As many docker container the upgrade of a container means you must destroy it before | As many docker container the upgrade of a container means you must destroy it before | ||
- | `pihole upgrade` | + | '' |
Upgrade the docker image, delete then build again the container | Upgrade the docker image, delete then build again the container | ||
====Backup==== | ====Backup==== | ||
- | All the container data are in `/ | + | All the container data are in '' |
====Bugs==== | ====Bugs==== | ||