Discussion:
[Dnsmasq-discuss] Change dns result for FACEBOOK.COM
Jorge Bastos
2017-05-29 11:18:31 UTC
Permalink
Howdy,

I'd like to change the result of some dns query's, in particular, I want
to change the result of the query for FACEBOOK.COM.

Is this possible with dnsmasq?

Jorge,
w***@gmail.com
2017-05-29 23:42:42 UTC
Permalink
Post by Jorge Bastos
Howdy,
I'd like to change the result of some dns query's, in particular, I want to
change the result of the query for FACEBOOK.COM.
Is this possible with dnsmasq?
absolutely...

in your dnsmasq.conf file, add the following lines...

# block these domains with NXDOMAIN
server=/example.com/
server=/facebook.com/
server=/fbcdn.net/
server=/fbcdn.com/
server=/facebook.net/


and you should look in the manual about the use of this config verb so that you
understand it more fully than this simple example can provide ;)
--
NOTE: No off-list assistance is given without prior approval.
*Please keep mailing list traffic on the list unless*
*a signed and pre-paid contract is in effect with us.*
Jorge Bastos
2017-05-31 08:20:20 UTC
Permalink
Howdy,

Oh that's nice, I even use that for local AD redirection.
Meanwhile, while looking at the config again, I just saw that there's a:

# --address (and --server) work with IPv6 addresses too.
#address=/www.thekelleys.org.uk/fe80::20d:60ff:fe36:f83

Which is exactly what I want, I could use your example but in this
particular case, I want to put users to see a message why they can't
access facebook.

Thanks for the help :)
Post by w***@gmail.com
Post by Jorge Bastos
Howdy,
I'd like to change the result of some dns query's, in particular, I
want to change the result of the query for FACEBOOK.COM.
Is this possible with dnsmasq?
absolutely...
in your dnsmasq.conf file, add the following lines...
# block these domains with NXDOMAIN
server=/⁠example.com/⁠
server=/⁠facebook.com/⁠
server=/⁠fbcdn.net/⁠
server=/⁠fbcdn.com/⁠
server=/⁠facebook.net/⁠
and you should look in the manual about the use of this config verb so
that you understand it more fully than this simple example can provide
;)
Loading...