pihole

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
pihole [2020/12/29 19:02]
Stephane de Labrusse [Installation]
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, you will run a docker container either on the ''aeria'' network (experimental) or on the ''macvlan'' network (Recommended). Saying that the pihole container will have an IP on your network, you will just have to set in the DHCP server of your network that the DNS server is the IP of pihole+nethserver-pihole relie on nethserver-docker, you will run a docker container either on the ''aeria'' network (experimental) on the ''macvlan'' network or on the ''aqua'' network (Recommended). You will just have to set in the DHCP server of your network that the DNS server is the IP of pihole (for ''aeria'' and ''macvlan'' network) or the NethServer (for ''aqua'' network)
  
 ====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 ''aeria network'', please jump to the next [[pihole#aeria|chapter]]. If you want to use ''macvlan network'', please jump to the chapter [[pihole#macvlan|below]] 
 +
 +''aqua'' is the network for all containers on NethServer, all containers can contact each others, the host can contact the container, it is fast and secure. You have no special network configuration to do but the hosts on your local network cannot contact directly the container of pihole. You have to set the DNS server of your host to the NethServer IP and set the container IP as the DNS server of your NethServer.
 +
 +<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 
 +</WRAP>
 +
 +  * We have to set the network of the pihole container, do: 
 +
 +<file>
 +config setprop pihole piholeNetwork aqua
 +</file>
 +
 +go to create the container, please jump to the next [[pihole#create_the_container|chapter]] 
 +
 +Once the container is up
 +  * Go to the cockpit dashboard, set the IP of the primary DNS server to the IP ''172.28.45.1'' (default of the pihole container). Alternatively you can set also a second dns server if needed ''172.28.45.1,8.8.8.8'' (for example)
 +  * Then use NethServer as the DNS server of your network (by adding it manually in each host or by DHCP)
 +
  
 ===Macvlan=== ===Macvlan===
Line 44: Line 66:
 config setprop pihole piholeNetwork macvlan piholeMacVlanIP 192.168.1.234 config setprop pihole piholeNetwork macvlan piholeMacVlanIP 192.168.1.234
 </file> </file>
 +
 +go to create the container, please jump to the next [[pihole#create_the_container|chapter]] 
 +
 === Aeria === === Aeria ===
  
-if you have decided to use the ''macvlan network'', please jump to the next [[pihole#create_the_container|chapter]] +if you have decided to use the ''macvlan network'' or ''aqua network'', please jump to the next [[pihole#create_the_container|chapter]] 
  
 To create the AERIA network please review https://github.com/NethServer/nethserver-docker/blob/master/README.rst#aeria-network To create the AERIA network please review https://github.com/NethServer/nethserver-docker/blob/master/README.rst#aeria-network
Line 64: Line 89:
  
 ''config setprop pihole piholeNetwork aeria'' ''config setprop pihole piholeNetwork aeria''
 +
 +go to create the container, please jump to the next [[pihole#create_the_container|chapter]] 
  
 === Create the container === === Create the container ===
Line 88: Line 115:
  
 <file> <file>
-config setprop docker password azertyuiop+config setprop pihole password azertyuiop
 </file> </file>
  
Line 122: Line 149:
 <file> <file>
 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
- 
 </file> </file>
  
Line 130: Line 156:
 <file> <file>
 signal-event nethserver-pihole-update signal-event nethserver-pihole-update
- 
 </file> </file>
  
Line 141: Line 166:
 ''pihole status'' ''pihole status''
  
-Modify the PHP CGI memory limit+=== 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 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
  
Line 155: Line 181:
 ==== Where to start ==== ==== Where to start ====
  
 +  * for ''macvlan'' or ''aeria''
 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 ''admin'' and the password set in the ''password'' esmith property 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 ''admin'' and the password set in the ''password'' esmith property
  
 +  * for ''aqua''
 +
 +Once installed pihole is available at the https://pi.hole, then log with the credential ''admin'' and the password set in the ''password'' esmith property
  
 ====Making devices use Pi-hole==== ====Making devices use Pi-hole====