The webpage shows this:
which is consistent with what pihole-FTL
thinks but not what I find:
$ grep Gravity /var/log/pihole-FTL.log
[2017-11-18 10:58:50.854] Gravity list entries: 107094
$ wc -l /etc/pihole/gravity.list
133345 /etc/pihole/gravity.list
That's a difference of over 26000 domains!
Can someone explain that please?
token: ds3eiaaypb
Mcat12
November 18, 2017, 8:32pm
2
Try restarting FTL:
sudo service pihole-FTL restart
Been there, done that.
Even rebooted but to no avail.
Difference remains.
diginc
November 20, 2017, 7:28pm
4
You may need to dig into the contents of gravity.list to see if it truly has 26000 extra unique entries in it. Are you running a custom gravity list or custom external lists? when you just run gravity.sh
manually how many domains does it list as unique?
My guesses on the cause: comments and bad domain addresses wouldn't be counted in the machine total where as they would in a word/line count command. I believe gravity.sh will remove all comments from lists by default so unless you run a completely custom gravity.list it is probably not that. If you have bad domains in your lists DNSMasq should be throwing errors (check your pihoe log) as it reads your gravity.list.
does the amount change if you disable one of the lists?
I run
cat /etc/pihole/gravity.list | sort | uniq > /tmp/tmp; mv /tmp/tmp /etc/pihole/gravity.list
after I've added my own list.
Just to give some background:
I have several years of experience with running dnsmasq
. I see no errors in it's logging.
I add my own list to the existing gravity.list
and screen it thoroughly, removing duplicates and whitelisted sites.
I could post my sources if that would be of any help.
From the source of pihole-FTL
I gather that it "just" counts lines similar to what wc -l
does.
If that is a wrong assumption I'd be glad to be educated.
Okay, going to try and rule some stuff out. Bear with me.
First thing I'd like you to try is:
mkdir /var/www/html/lists
cp /path/to/your/list.txt /var/www/html/lists/customlist.txt
THEN via the webui,
add http://YOURPIHOLEIPADDRESS/lists/customlist.txt
then update your blocklists, either from the webui, or by running pihole -g
Let me know if that changes your count.
1 Like
After adding the list via the WebUI, it said that it was "Updating..."
Relevant part of logging:
::: Aggregating list of domains... done!
::: Formatting list of domains to remove comments.... done!
::: 263679 domains being pulled in by gravity...
::: Removing duplicate domains.... done!
::: 133374 unique domains trapped in the event horizon.
Result:
$ wc -l /etc/pihole/gravity.list
133375 /etc/pihole/gravity.list
Now it's updated!
This begs the question, whether pihole-FTL
keeps a record of the count somewhere and doesn't update it when it gets restarted?
Officially, we don't support modifying gravity.list directly.
We are looking into why the number didn't update, because in reality it should have.
However, the option I gave you is a functional solution until we apply this PR to add the ability to add local files directly.
pi-hole:development
← pi-hole:new/locallists
opened 05:43PM - 21 Nov 17 UTC
**By submitting this pull request, I confirm the following (please check boxes, … eg [X]) _Failure to fill the template will close your PR_:**
***Please submit all pull requests against the `development` branch. Failure to do so will delay or deny your request***
- [X] I have read and understood the [contributors guide](https://github.com/pi-hole/pi-hole/blob/master/CONTRIBUTING.md).
- [X] I have checked that [another pull request](https://github.com/pi-hole/pi-hole/pulls) for this purpose does not exist.
- [X] I have considered, and confirmed that this submission will be valuable to others.
- [X] I accept that this submission may not be used, and the pull request closed at the will of the maintainer.
- [X] I give this submission freely, and claim no ownership to its content.
**How familiar are you with the codebase?:**
## 10
---
This PR adds support for local blocking lists using the file protocol (e.g. `file:///home/pi/mylist.txt`).
Exemplary `adlists.list`:
```
https://zeustracker.abuse.ch/blocklist.php?download=domainblocklist
https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt
https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt
https://hosts-file.net/ad_servers.txt
https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
https://mirror1.malwaredomains.com/files/justdomains
file:///home/pi/test.list
file:///home/pi/test123.list
```
Note the two `file://` lists at the end of the file. The first one exists, the second one doesn't exist. Running `pihole -g` produces the following output:
```
[i] Neutrino emissions detected...
[✓] Pulling blocklist source list into range
[i] Target: zeustracker.abuse.ch (blocklist.php?download=domainblocklist)
[✓] Status: No changes detected
[i] Target: s3.amazonaws.com (simple_tracking.txt)
[✓] Status: No changes detected
[i] Target: s3.amazonaws.com (simple_ad.txt)
[✓] Status: No changes detected
[i] Target: hosts-file.net (ad_servers.txt)
[✓] Status: No changes detected
[i] Target: raw.githubusercontent.com (hosts)
[✓] Status: Retrieval successful
[i] Target: mirror1.malwaredomains.com (justdomains)
[✓] Status: No changes detected
[i] Target: local (test.list) <------------------- this file exists
[✓] Status: Retrieval successful
[i] Target: local (test123.list) <------------------- this file doesn't exist
[✗] Status: Not found / empty list
[✗] List download failed: no cached list available
[✓] Consolidating blocklists
[✓] Extracting domains from blocklists
[i] 109.715 domains being pulled in by gravity
[✓] Removing duplicate domains
[i] 100.825 unique domains trapped in the Event Horizon
[✓] Adding 6 blocklist source domains to the whitelist
[✓] Whitelisting 12 domains
[i] Blacklisted 1 domain
[i] Wildcard blocked 5 domains
[✓] Parsing domains into hosts format
[✓] Cleaning up stray matter
[✓] DNS service is running
[✓] Pi-hole blocking is Enabled
```
Querying also works fine:
```
$ cat /home/pi/test.list
0.0.0.0 testing.com
1.2.3.4 testing2.com
$ pihole -q testing2.com
Match found in list.6.local.domains:
testing2.com
```
_This template was created based on the work of [`udemy-dl`](https://github.com/nishad/udemy-dl/blob/master/LICENSE)._
Hope that helps,
1 Like
system
Closed
February 9, 2018, 7:16pm
11
This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.