In my dnsmasq.conf file, I use the following rule o block all domains ending with .be
:
address=/be/
But I would like to have an exception for youtu.be
.
How can I do this?
This seems to work:
dnsmasq -C /dev/null -k \
--server=/youtu.be/# \
--address=/be/ \
--log-facility=/dev/stdout \
--log-queries
From the docs for the --server
option:
The special server address
#
means, "use the standard servers", so--server=/google.com/1.2.3.4 --server=/www.google.com/#
will send queries forgoogle.com
and its subdomains to1.2.3.4
, exceptwww.google.com
(and its subdomains) which will be forwarded as usual.
With this running on my local machine:
# dig +short foo.be @localhost
# dig +short youtu.be @localhost
142.250.72.110