3
1
I'm trying to prevent my web browser from communicating with certain hosts (mostly ads and tracking). I have a list of such hosts in my /etc/hosts
file.
For IPv4 I can do:
255.255.255.255 example.com
How can I do that with IPv6? The following two do not seem to work:
::1 example.com
ff02::2 example.com
This is for dnsmasq
on a Debian machine. Please assist
UPD Please also advise what's an easy way to check the results - something similar to nslookup on Windows. Tried dig -6 example.com
but it hangs and then throws an error.
# dig example.com -6
; <<>> DiG <<>> example.com -6
;; global options: +cmd
;; connection timed out; no servers could be reached
Exactly what are you actually trying to accomplish? – Michael Hampton – 2014-10-16T17:32:23.747
@MichaelHampton I'm trying to prevent my web browser from communicating with certain hosts. – aexl – 2014-10-16T17:33:16.820
Why bother with IPv6 specifically? If your browser is using names to look up the hosts, then it doesn't care whether it gets an IPv4 or IPv6 address back. If it's already doing IPv6 then it's already found an address and nothing you can put in /etc/hosts will change that. – wurtel – 2014-10-17T10:11:14.873
wow@wurtel. You really missed the point of an ad-blocking hosts file! – hopeseekr – 2016-06-25T12:02:06.910