Merge pull request #310 from pi-hole/tweaks/general

General tweaks
This commit is contained in:
DL6ER
2020-05-14 18:24:12 +02:00
committed by GitHub
5 changed files with 8 additions and 19 deletions
+1 -1
View File
@@ -30,7 +30,7 @@ When working on this repo, it is advised that you review your changes locally be
Please make sure you fork the repo and change the clone URL in the example below for your fork:
- Linux Mint / Ubuntu 18.04 LTS / 19.10:
- Linux Mint / Ubuntu 18.04 LTS / 19.10 / 20.04 LTS:
- Preparations (only required once):
```bash
+5 -5
View File
@@ -19,12 +19,12 @@ sudo dnf install gcc gmp-devel gmp-static m4
---
You'll also need to compile `nettle` as *FTL*DNS uses `libnettle` for handling DNSSEC. Compile and install a recent version of `nettle` (we recommend 3.5):
You'll also need to compile `nettle` as *FTL*DNS uses `libnettle` for handling DNSSEC. Compile and install a recent version of `nettle` (we tested and recommend 3.6):
```bash
wget https://ftp.gnu.org/gnu/nettle/nettle-3.5.tar.gz
tar -xvzf nettle-3.5.tar.gz
cd nettle-3.5
wget https://ftp.gnu.org/gnu/nettle/nettle-3.6.tar.gz
tar -xvzf nettle-3.6.tar.gz
cd nettle-3.6
./configure
make
sudo make install
@@ -44,7 +44,7 @@ If you want to build another branch and not `master`, use checkout to get to thi
*FTL*DNS can now be compiled and installed:
```bash
make -j 4
make -j $(nproc)
sudo make install
```
+2 -2
View File
@@ -16,13 +16,13 @@ We place hooks in a lot of places in the resolver that branch out into `FTL` cod
#### Remove limit on maximum cache size
Users can configure the size of the resolver's name cache. The default is 150 names. Setting the cache size to zero disables caching. We think users should be allowed to set the cache size to any value they find appropriate. However, `dnsmasq`'s source code contains a condition that limits the maximum size of the cache to 10,000 names. We removed this hard-coded upper limit in [option.c](https://github.com/pi-hole/FTL/commit/ea3309e7b1991f50d40555b9a18f39894c237b29#diff-733116077302620357dcd8252f41449dR2582R258) and submitted a patch to remove this hard-coded limit in the upstream version of `dnsmasq`.
Users can configure the size of the resolver's name cache. The default is 150 names. Setting the cache size to zero disables caching. We think users should be allowed to set the cache size to any value they find appropriate. However, `dnsmasq`'s source code contains a condition that limits the maximum size of the cache to 10,000 names. We removed this hard-coded upper limit in and submitted a patch to remove this hard-coded limit in the upstream version of `dnsmasq`. It was accepted for `dnsmasq v2.81`.
#### Improve detection algorithm for determining the "best" forward destination
The DNS forward destination determination algorithm in *FTL*DNS's is modified to be much less restrictive than the original algorithm in `dnsmasq`. We keep using the fastest responding server now for 1000 queries or 10 minutes (whatever happens earlier) instead of 50 queries or 10 seconds (default values in `dnsmasq`).
We keep the exceptions, i.e., we try all possible forward destinations if `SERVFAIL` or `REFUSED` is received or if a timeout occurs.
Overall, this change has proven to greatly reduce the number of actually performed queries in typical Pi-hole environments. It may even be understood as being preferential in terms of privacy (as we send queries much less often to all servers).
This has been implemented in commit [d1c163e](https://github.com/pi-hole/FTL/commit/d1c163e499a5cd9f311610e9da1e9365bbf81e89) on the `FTLDNS` branch.
This has been implemented in commit [d1c163e](https://github.com/pi-hole/FTL/commit/d1c163e499a5cd9f311610e9da1e9365bbf81e89).
{!abbreviations.md!}
-4
View File
@@ -23,10 +23,6 @@ Command-line arguments can be arbitrarily combined, e.g. `pihole-FTL debug test`
- `/var/run/pihole-FTL.port` file containing port on which `FTL` is listening
- `/var/run/pihole/FTL.sock` Unix socket
## Domain lists format
Since Pi-hole v4.0, we use a simpler domain list format for the two important blocklist files `gravity.list` and `black.list`. In contrast to the traditional HOSTS format (which caused a lot of overhead), the domain list format is the minimal possible solution for saving memory while still using plain text lists for your convenience. When *FTL*DNS imports these two files, they are walked by our improved list parser speeding up the loading of blocklists significantly. Regardless of which blocking mode (`IP` or `NXDOMAIN`) is selected, *FTL*DNS will always load the lists into its internal hashed cache to be able to determine the blocking status within a few milliseconds, even when you're using huge blocking lists on low-end devices. With everything we do, we design *FTL*DNS for maximum efficiency also on low-performance devices.
## Linux capabilities
Capabilities (POSIX 1003.1e, [capabilities(7)](http://man7.org/linux/man-pages/man7/capabilities.7.html)) provide fine-grained control over superuser permissions, allowing the use of the `root` user to be avoided.
-7
View File
@@ -39,11 +39,4 @@ This setting disables
- Query Log
- Long-term database logging
### Level 4 - disabled statistics (v4.1+)
Disables all statistics processing. Even the query counters will not be available.
Additionally, you can disable logging to the file `/var/log/pihole.log` using `sudo pihole logging off`.
Note that - due to the disabled query processing - regex blocking is **not** available on level 4.
{!abbreviations.md!}