There are some services using multiple subdomains which are frequently changing. While it is not possible to blacklist them all, it would be great to have the possibility to automatically block subdomains of specific hosts. Maybe based on the blocklist they are listed in (sorry for my bad english!).
Let’s say I’ve blacklisted
.xyz with the following in
That works, and I can no longer connect to anything on the
xyz TLD. However, I know that I want to be able to access Alphabet’s site (
https://abc.xyz). In order to do this, I can either create another file (to keep things seperate (e.g
/etc/dnsmasq.d/03-exceptions.conf) or add my exceptions to
02-wildcards.conf like so:
220.127.116.11 are your chosen upstream DNS IPs)
So, to tie it all together, the entire contents of my additional config file (the name really doesn’t matter, but they are read into
dnsmasq in alphanumerical order):
pi@raspberrypi:~ $ cat /etc/dnsmasq.d/02-cust.conf #Block Entire XYZ TLD address=/.xyz/192.168.1.253 #Exceptions below: #Alphabet: server=/abc.xyz/18.104.22.168 server=/abc.xyz/22.214.171.124
remember to reload and restart
sudo service dnsmasq reload
sudo service dnsmasq restart
Logging for wildcard support
It would be great. For example ad hosting network bannerflow.com has unlimited subdomains for serving ads.
Wildcard blacklisting has been implemented and will be available with the next update.