DNS server for blacklisting tons of domains and also some TLDs
5
votes
1
answer
11895
views
I'm trying to setup a basic DNS server for my lan that is able to put in a nullroute or 127.0.0.1 lots of domains.
The domains I want to block come from a list but I also want to block some domains using regular expressions (this is a must for my setup).
My candidate software for doing this business seemed to be Unbound, a recursive caching secure DNS server with various useful functions.
**However Unbound doesn't seem to support any regular expression!**
Also, Unbound is very picky when it comes for zones repetitions. My domain list is builded from many mixed sources so I can have many repetitions that I filter out with some scripts but also domains in list like:
**aaah.very.this.com**
but also
**very.this.com**
This lead Unbound scream for errors because there is a zone repetition.
While this is a minor issue, that I can remove by cleaning even better the domain list, my main issue is the lack of regexp for handling the domain requests.
Can i somehow block all *.com or *.biz or stuff like that?
[\w\.\-]+.com A 127.0.0.1
[\w\.\-]+.com AAAA ::1
My regex is an example, i could go with more complex ones...
BONUS
-----
Can I instead do something even more nasty? Have everything pointing to nullroute or 127.0.0.1 and ONLY a whitelist of domains get resolved by being forwarded to an external DNS ?
If replying please do not forget this extra question as I am very interesting in knowing the answer.
**What i can go for? Bind9, dnsmasq, unbound, pdns-recursor...**
Asked by user3450548
(3094 rep)
Mar 8, 2016, 10:37 AM
Last activity: Mar 1, 2018, 01:28 PM
Last activity: Mar 1, 2018, 01:28 PM