Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

blacklist entries are not always handled correctly #66

Closed
Hjdskes opened this issue Apr 8, 2017 · 1 comment
Closed

blacklist entries are not always handled correctly #66

Hjdskes opened this issue Apr 8, 2017 · 1 comment

Comments

@Hjdskes
Copy link

Hjdskes commented Apr 8, 2017

Just making sure you see the issue reported here: https://bbs.archlinux.org/viewtopic.php?pid=1702738#p1702738

If I add an entry to my black.list via hostsblock-urlcheck, it will not get added to hosts.block if there is an existing entry with a more restricted domain. For example, if I'm already blocking very.bad.site.com, and I add bad.site.com to the blacklist, it will not show up in hosts.block, and my DNS server (after restart of course) will forward the query and resolve bad.site.com.
I can take care of this problem with a tweak in the hostsblock script:

202c202
<         grep -q "$_blacklistline" "$hostsfile" || echo "$redirecturl $_blacklistline" >> "$hostsfile"
---
>         grep -qx "$_blacklistline" "$hostsfile" || echo "$redirecturl $_blacklistline" >> "$hostsfile"

There is a warning in hostsblock.conf, to the effect that additions to the blacklist should be more specific than the most basic domain names, but note that many of the entries coming from the block lists are indeed very stripped-down domains.

gaenserich pushed a commit that referenced this issue Jul 25, 2017
@gaenserich
Copy link
Owner

901ea7e

Thanks for the heads up!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants