Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
@1nt3rn3tc0wb0y Based on words? I've been looking into this for more than a year and haven't found anything that can do this yet.
If bind can do that I'd love to know! -
@linuxxx like, a file of certain things that should be blocked by default, like Google in your example. I'm sure in 100k lines you've got quite a bunch of bad sites blocked lol
-
@ScribeOfGoD Yeah I download the hosts files of a few known blacklists and put them all together :)
-
@ScribeOfGoD Yes but I've got to look that up tomorrow, need sleep after my 3-hours of sleep last night 😅
-
@linuxxx oh, I guess it's not the case anymore then, since usually people complain about system or browser startup times, because all that has to be read in or smth.
-
As much work you're putting into this it might be easier to write a custom dns server
-
@JoshBent can you specify this statement? I'd like to know what kind of problems you may run into.
-
aritzh7527y@linuxxx If I understand it correctly, if you monitor the DNS queries, and append the "bad" ones to the hosts file, wouldn't the first request be successful? Not that it is a big deal, but maybe there was a way to even avoid that
-
@Emphiliis if you scroll down a bit after my initial message, you'll see me mentioning them
-
@PerfectAsshole Found a pure php DNS server, going to see if I can use that to reach my goal :)
-
@DoubleAngels It's always done wildcard filtering. But I'm not talking about that, I'm also talking about string based matching. If that works on the pi, I'll still be happy to be writing my own version :)
Holy fuck, this is starting to work!
Problem: I am highly anti google/facebook/few others and I'd rather null route those DNS requests.
The problem is that the pihole only can blacklist domains or wildcard domains but not words. So if Google would come up with a new name for some of their domains, I'd be fucked because I can't filter out the word Google through the pihole.
Today I fucking found the solution (still a work in progress but a PoC is nearly working):
Compiled a program which can monitor DNS queries/requests and logs them to a file.
Have a php (yes I write most of my cli tools in php) script tailing the log file and gathering the requested domains from it.
Then I can see if the domain contains the substring which I don't like (google as word for example) and echo it to the end of my hosts file with 0.0.0.0 in front of it if that's the case.
Holy fuck this seems to be working! 😍
rant