Table of Contents
If you want to send us your comments, please do so. Thanks
More on comments
pi-hole
General security and pivacy warning
Warning: When you use debug mode
pihole -d
a lot of data from you network and sites you are visiting WAS put up on
http://termbin.com/[4 digit hash]
This is NOT the case anymore, the issue is fixed
Be warned for other applications. This is not the first time we have encountered this behavior
Installing Pi-hole
This is based on Pi-hole Core v5.2.4
Update Debian first
Run
apt-get update or aptitude
to update the package list and install updates
The install script
Dependencies
Before running the install script the following programs should be installed manually since they are dependencies for which Pi-hole will check. By installing them before running the Pi-hole install script answering questions during the install by Pi-hole is avoided
So run as root:
Installer dependencies
aptitude --verbose --log-level=info --log-file=$HOME/pi-hole.installer.log install git iproute newt procps-ng which chkconfig bind-utils
Pi-hole dependencies
aptitude --verbose --log-level=info --log-file=$HOME/pi-hole.dependencies.log install cronie curl findutils nmap-ncat sudo unzip libidn2 psmisc sqlite libcap lsof
Pi-hole web dependencies
aptitude --verbose --log-level=info --log-file=$HOME/pi-hole.web-dependencies.log install lighttpd lighttpd-fastcgi php-common php-cli php-pdo php-xml php-json php-intl
Download the install script
wget --inet4-only --tries=3 --quiet --no-proxy --output-document=$HOME/pi-hole-basic-install.sh https://install.pi-hole.net
Edit the install script
DNS servers
Edit pi-hole-basic-install.sh and remove (or move and comment out) the DNS servers you do not need from the DNS_SERVERS variable list. When done save and close pi-hole-basic-install.sh Make sure the script is execuable
chmod 740 $HOME/pi-hole-basic-install.sh
Install Pi-hole
$HOME/pi-hole-basic-install.sh
If you have multiple networkcards in your computer you maybe can find the one to use by Pi-hole with ifconfig (look at the amount of data transfered) probably without any issues
Update Pi-hole
As root do
pihole -up
Webinterface
Notice: If there is no secure connection omit, delete, the 's' in 'https'
http://192.168.x.y/admin or http://www.pi.hole/admin
Block domains
To block all domains do
- Login to the webinterface
- Click in the “RegEx filter” tab
- In the “Regular Expression” box enter “*” (a star (Shift 8))
- If needed, it is advised, you can enter a discription in the “Comment” box
- Press the blue “Add to Blacklist” button
- If needed you can disable (and later re-enable the entry) in the status column in the “List of blacklisted entries” section
Example: Enter a “*” to block everything. The comment can be something like “Block everything”
Import json adlist
In Adlists enter the location of the adlist to be added and click on Add. This might not work
file:///home/user/Downloads/Someadlist.json
Via URL's
- If a Teleporter file is received run: tar xf teleporterfile.tar.gz
- Open adlist.json in a webbrowser. Maybe wait a bit for the file being processed
- Save the page as adlist.json.txt
- grep address adlist.json.txt | tr -d '\n' | tr -d \“ | tr '\t' ' '
- Scrape all the url's from the screen
- Past in the “Add a new adlist” “Address:” field on the http://someIP/admin/groups-adlists.php page
- Click on the Add button
File locations
/etc/.pihole /etc/pihole /var/www/html/custom_disable_timer (When disabling pi-hole using the web interface a timing file is generated (custom_disable_timer) in the www-root directory.)
Firewall
nft
In /etc/nftables.conf on the server add, change to something like:
define tcp_services = { ssh, 22, http, 80 } udp dport { 53 } ip saddr SomeIPaddress accept; # DNS tcp dport { 80 } ip saddr SomeIPaddress accept; # WWW
ufw
For UFW on the server make sure
ufw status verbose
shows at least, if you use the 192.168 range, (xxx some value from 0 to 255)
To Action From -- ------ ---- 192.168.xxx.0/24 53/udp ALLOW IN 192.168.xxx.0/24 192.168.xxx.0/24 80/tcp ALLOW IN 192.168.xxx.0/24
Adlist
Default Pi-hole 5 comes with the hosts list from Steven Black
The adlists are stored in /etc/pihole
To add more items
- Paste the contents of this space separated file (Select all the links CTRL-C CTRL-V) into the “Address:” field on the “Adlist group management” pages (admin/groups-adlists.php) to have 68 lists added
- Click on the blue “Add” button on the right. A green list appears. Click on the X in the upper right corner
- To update, in the left column click on Tools > Update Gravity
- This takes a while
Filter lists
Data from Filterlists can be used to add more lists to the Adlist
filterlists.com
Adlist tool
As an alternative you can use the Pi-hole adlist tool on Github
Insert local list
In the case of a local file, the format would be file:///file-location1)
Example:
file:///home/pi/adlist.list
Resolve issues
SERVFAIL
When not all domainnames resolve and you get when testing with nslookup www.example.com
** server can't find www.example.com: SERVFAIL
then check on http://[IP_of_your_PiholeComputer]/admin/settings.php?tab=dns under Advanced DNS settings if you have turned DSNSEC on. If so, check if your upstream DSNserver, router, supports DNSSEC. If not or in doubt, change the DNS server stetting of Pihole
Change on http://[IP_of_your_PiholeComputer]/admin/settings.php?tab=dns under Upstream DNS Servers the servers to a server of which you are sure they support DNSSEC if you still want to your DNSSEC. If so also make sure DNSSEC is turned on in het Advanced DNS settings chapter on the same page
Log period selection
### Versions Pi-hole version is v5.3.1 (Latest: v5.3.1) AdminLTE version is v5.5 (Latest: v5.5) FTL version is v5.8.1 (Latest: v5.8.1)
### Platform - OS and version: Debian 10 Buster - Platform: Desktop PC
### Expected behavior _A clear and concise description of what you expected to happen._
### Actual behavior / bug _A clear and concise description of what the bug is._ In admin/db_queries.php: “Specify date range to be queried from the Pi-hole query database” I want to select one day. Say 15 May 10:00 until 16 May 10:00. So on the left side I click on May and then 15. Then I click on the right side (June is selected) on May. Now May on the left side switches to April. The date and time do not change. So the period seems not to be shorter then one month.
Steps to reproduce the behavior:
1. Go to '…' 2. Click on '….' 3. Scroll down to '….' 4. See error
## Debug Token
- URL:
<!-- Token generated by running `pihole -d`. https://docs.pi-hole.net/core/pihole-command/#debugger
The token is displayed at the end of the debug process if you allow for uploading the log file.
[✓] Your debug token is: https://tricorder.pi-hole.net/wim5hft4rq
Debug logs are visible ONLY to developers and support staff. They are not publically accessible and all logs are automatically deleted after 48 hours. -->
### Screenshots
_If applicable, add screenshots to help explain your problem._
### Additional context
_Add any other context about the problem here._
Web Admin repo is missing
Error: Web Admin repo is missing from system! Please re-run install script from https://pi-hole.net
Do as root:
- cd /var/www/html/
- rm -ri admin/
- Check if the right files are being deleted. If so
- CTRL-C
- rm -rf admin/
- To delete the whole admin/ directory
- git clone https://github.com/pi-hole/AdminLTE.git /var/www/html/admin
- pihole -r
- Choose: Repair
Useful links
Block Millions Of Ads Network-wide With A Raspberry Pi-hole 2.0
Main subjects on this wiki: Linux, Debian, HTML, Microcontrollers, Privacy
RSS
Disclaimer
Privacy statement
Bugs statement
Cookies
Copyright © : 2014 - 2024 Webevaluation.nl and the authors
Changes reserved.