[Solved] Why isn't my hosts file working?

I put the hosts file generated from StevenBlack in /tmp/custom_hosts. Below is my configuration. Why isn't it blocking anything?
21

I've not personally tried using "Additional Hosts files"; but dnsmasq automatically picks up any and all hosts files saved within /tmp/hosts/ directory.

Also note that dnsmasq will only read these hosts files during start up. If you placed a new file in there, you must restart it via GUI or using the command line "/etc/init.d/dnsmasq restart".

After restarting the device I copied the hosts file to "/tmp/hosts/custom_hosts". Then I ran “/etc/init.d/dnsmasq restart”. Still not blocking.

You can examine the logs after dnsmasq restart to see if it was able to load the hosts file; using "logread". It'll list the number of entries in the file if successful, and complain about bad entries:

daemon.info dnsmasq[30124]: read /etc/hosts - 4 addresses
daemon.err dnsmasq[30124]: bad name at /tmp/hosts/bad.host line 93399
daemon.info dnsmasq[30124]: read /tmp/hosts/bad.host - 125030 addresses

My bad; Additional Hosts files refers to the directory containing "hosts" files. In my case, it was /tmp/hosts. In your original post, you should create a directory name "/tmp/custom_hosts/" and place your hosts files in that directory.

I should have RTFM:

https://wiki.openwrt.org/doc/uci/dhcp#all_options

OK. I changed the directory setting to /tmp/hosts/ and copied my file to /tmp/hosts/custom_hosts. However it's still not working. Here's the logread:

daemon.info dnsmasq[1377]: read /tmp/hosts/odhcpd - 2 addresses
daemon.info dnsmasq[1377]: read /tmp/hosts/dhcp.cfg02411c - 2 addresses
daemon.info dnsmasq[1377]: read /tmp/hosts/custom_hosts - 65595 addresses
daemon.info dnsmasq-dhcp[1377]: read /etc/ethers - 0 addresses

Enable logs for the DNS in dnsmasq (add a "log-queries" line at the end of "/etc/dnsmasq.conf"), and see what is dnsmasq being asked and what is dnsmasq answering.

OK. I did that and here's another logread: (Does this tell you anything useful?)

Wed Mar 21 09:02:07 2018 daemon.info dnsmasq[1094]: started, version 2.78 cachesize 150
Wed Mar 21 09:02:07 2018 daemon.info dnsmasq[1094]: DNS service limited to local subnets
Wed Mar 21 09:02:07 2018 daemon.info dnsmasq[1094]: compile time options: IPv6 GNU-getopt no-DBus no-i18n no-IDN DHCP no-DHCPv6 no-Lua TFTP no-conntrack no-ipset no-auth no-DNSSEC no-ID loop-detect inotify
Wed Mar 21 09:02:07 2018 daemon.info dnsmasq-dhcp[1094]: DHCP, IP range 192.168.1.100 -- 192.168.1.249, lease time 47m
Wed Mar 21 09:02:07 2018 daemon.info dnsmasq[1094]: using nameserver 8.8.8.8#53
Wed Mar 21 09:02:07 2018 daemon.info dnsmasq[1094]: using nameserver 8.8.4.4#53
Wed Mar 21 09:02:07 2018 daemon.info dnsmasq[1094]: using nameserver 75.75.75.75#53
Wed Mar 21 09:02:07 2018 daemon.info dnsmasq[1094]: using nameserver 75.75.76.76#53
Wed Mar 21 09:02:07 2018 daemon.info dnsmasq[1094]: using local addresses only for domain lan
Wed Mar 21 09:02:07 2018 daemon.info dnsmasq[1094]: reading /tmp/resolv.conf.auto
Wed Mar 21 09:02:07 2018 daemon.info dnsmasq[1094]: using nameserver 8.8.8.8#53
Wed Mar 21 09:02:07 2018 daemon.info dnsmasq[1094]: using nameserver 8.8.4.4#53
Wed Mar 21 09:02:07 2018 daemon.info dnsmasq[1094]: using nameserver 75.75.75.75#53
Wed Mar 21 09:02:08 2018 daemon.info dnsmasq[1094]: using nameserver 75.75.76.76#53
Wed Mar 21 09:02:08 2018 daemon.info dnsmasq[1094]: using local addresses only for domain lan
Wed Mar 21 09:02:08 2018 daemon.info dnsmasq[1094]: using nameserver 75.75.76.76#53
Wed Mar 21 09:02:08 2018 daemon.info dnsmasq[1094]: using nameserver 75.75.75.75#53
Wed Mar 21 09:02:08 2018 daemon.info dnsmasq[1094]: using nameserver 8.8.4.4#53
Wed Mar 21 09:02:08 2018 daemon.info dnsmasq[1094]: using nameserver 8.8.8.8#53
Wed Mar 21 09:02:08 2018 daemon.info dnsmasq[1094]: using nameserver 75.75.76.76#53
Wed Mar 21 09:02:08 2018 daemon.info dnsmasq[1094]: using nameserver 75.75.75.75#53
Wed Mar 21 09:02:08 2018 daemon.info dnsmasq[1094]: using nameserver 8.8.4.4#53
Wed Mar 21 09:02:08 2018 daemon.info dnsmasq[1094]: using nameserver 8.8.8.8#53
Wed Mar 21 09:02:08 2018 daemon.info dnsmasq[1094]: read /etc/hosts - 4 addresses
Wed Mar 21 09:02:08 2018 daemon.info dnsmasq[1094]: read /tmp/hosts//odhcpd - 0 addresses
Wed Mar 21 09:02:08 2018 daemon.info dnsmasq[1094]: read /tmp/hosts//dhcp.cfg02411c - 2 addresses
Wed Mar 21 09:02:08 2018 daemon.info dnsmasq[1094]: read /tmp/hosts/odhcpd - 0 addresses
Wed Mar 21 09:02:08 2018 daemon.info dnsmasq[1094]: read /tmp/hosts/dhcp.cfg02411c - 2 addresses
Wed Mar 21 09:02:08 2018 daemon.info dnsmasq-dhcp[1094]: read /etc/ethers - 0 addresses
Wed Mar 21 09:02:09 2018 daemon.info dnsmasq[1094]: query[A] ipv6.msftconnecttest.com from 192.168.1.153
Wed Mar 21 09:02:09 2018 daemon.info dnsmasq[1094]: forwarded ipv6.msftconnecttest.com to 8.8.8.8
Wed Mar 21 09:02:09 2018 daemon.info dnsmasq[1094]: query[AAAA] ipv6.msftconnecttest.com from 192.168.1.153
Wed Mar 21 09:02:09 2018 daemon.info dnsmasq[1094]: forwarded ipv6.msftconnecttest.com to 8.8.8.8
Wed Mar 21 09:02:09 2018 daemon.info dnsmasq[1094]: reply ipv6.msftconnecttest.com is <CNAME>
Wed Mar 21 09:02:09 2018 daemon.info dnsmasq[1094]: reply v6ncsi.msedge.net is <CNAME>
Wed Mar 21 09:02:09 2018 daemon.info dnsmasq[1094]: reply ncsi.6-c-0003.c-msedge.net is <CNAME>
Wed Mar 21 09:02:09 2018 daemon.info dnsmasq[1094]: reply ipv6.msftconnecttest.com is <CNAME>
Wed Mar 21 09:02:09 2018 daemon.info dnsmasq[1094]: reply v6ncsi.msedge.net is <CNAME>
Wed Mar 21 09:02:09 2018 daemon.info dnsmasq[1094]: reply ncsi.6-c-0003.c-msedge.net is <CNAME>
Wed Mar 21 09:02:09 2018 daemon.info dnsmasq[1094]: reply 6-c-0003.c-msedge.net is 2a01:111:2003::52
Wed Mar 21 09:02:10 2018 daemon.info dnsmasq[1094]: query[AAAA] ipv6.msftconnecttest.com from 192.168.1.244
Wed Mar 21 09:02:10 2018 daemon.info dnsmasq[1094]: cached ipv6.msftconnecttest.com is <CNAME>
Wed Mar 21 09:02:10 2018 daemon.info dnsmasq[1094]: cached v6ncsi.msedge.net is <CNAME>
Wed Mar 21 09:02:10 2018 daemon.info dnsmasq[1094]: cached ncsi.6-c-0003.c-msedge.net is <CNAME>
Wed Mar 21 09:02:10 2018 daemon.info dnsmasq[1094]: cached 6-c-0003.c-msedge.net is 2a01:111:2003::52
Wed Mar 21 09:02:10 2018 daemon.info dnsmasq[1094]: query[A] ipv6.msftconnecttest.com from 192.168.1.244
Wed Mar 21 09:02:10 2018 daemon.info dnsmasq[1094]: cached ipv6.msftconnecttest.com is <CNAME>
Wed Mar 21 09:02:10 2018 daemon.info dnsmasq[1094]: cached v6ncsi.msedge.net is <CNAME>
Wed Mar 21 09:02:10 2018 daemon.info dnsmasq[1094]: cached ncsi.6-c-0003.c-msedge.net is <CNAME>
Wed Mar 21 09:02:10 2018 daemon.info dnsmasq[1094]: forwarded ipv6.msftconnecttest.com to 8.8.8.8
Wed Mar 21 09:02:10 2018 daemon.info dnsmasq[1094]: query[AAAA] ipv6.msftconnecttest.com from 192.168.1.174
Wed Mar 21 09:02:10 2018 daemon.info dnsmasq[1094]: cached ipv6.msftconnecttest.com is <CNAME>
Wed Mar 21 09:02:10 2018 daemon.info dnsmasq[1094]: cached v6ncsi.msedge.net is <CNAME>
Wed Mar 21 09:02:10 2018 daemon.info dnsmasq[1094]: cached ncsi.6-c-0003.c-msedge.net is <CNAME>
Wed Mar 21 09:02:10 2018 daemon.info dnsmasq[1094]: cached 6-c-0003.c-msedge.net is 2a01:111:2003::52
Wed Mar 21 09:02:10 2018 daemon.info dnsmasq[1094]: query[A] ipv6.msftconnecttest.com from 192.168.1.174
Wed Mar 21 09:02:10 2018 daemon.info dnsmasq[1094]: cached ipv6.msftconnecttest.com is <CNAME>
Wed Mar 21 09:02:10 2018 daemon.info dnsmasq[1094]: cached v6ncsi.msedge.net is <CNAME>
Wed Mar 21 09:02:10 2018 daemon.info dnsmasq[1094]: cached ncsi.6-c-0003.c-msedge.net is <CNAME>
Wed Mar 21 09:02:10 2018 daemon.info dnsmasq[1094]: forwarded ipv6.msftconnecttest.com to 8.8.8.8
Wed Mar 21 09:02:10 2018 daemon.info dnsmasq[1094]: reply ipv6.msftconnecttest.com is <CNAME>
Wed Mar 21 09:02:10 2018 daemon.info dnsmasq[1094]: reply v6ncsi.msedge.net is <CNAME>
Wed Mar 21 09:02:10 2018 daemon.info dnsmasq[1094]: reply ncsi.6-c-0003.c-msedge.net is <CNAME>
Wed Mar 21 09:02:10 2018 daemon.info dnsmasq[1094]: reply ipv6.msftconnecttest.com is <CNAME>
Wed Mar 21 09:02:10 2018 daemon.info dnsmasq[1094]: reply v6ncsi.msedge.net is <CNAME>
Wed Mar 21 09:02:10 2018 daemon.info dnsmasq[1094]: reply ncsi.6-c-0003.c-msedge.net is <CNAME>
Wed Mar 21 09:02:13 2018 daemon.info dnsmasq[1094]: query[A] cello.client-channel.google.com from 192.168.1.153
Wed Mar 21 09:02:13 2018 daemon.info dnsmasq[1094]: forwarded cello.client-channel.google.com to 8.8.8.8
Wed Mar 21 09:02:13 2018 daemon.info dnsmasq[1094]: reply cello.client-channel.google.com is 108.177.98.189
Wed Mar 21 09:02:14 2018 daemon.info dnsmasq[1094]: query[A] dns.msftncsi.com from 192.168.1.153
Wed Mar 21 09:02:14 2018 daemon.info dnsmasq[1094]: forwarded dns.msftncsi.com to 8.8.8.8
Wed Mar 21 09:02:14 2018 daemon.info dnsmasq[1094]: reply dns.msftncsi.com is 131.107.255.255
Wed Mar 21 09:02:15 2018 daemon.info odhcpd[700]: Raising SIGUSR1 due to default route change
Wed Mar 21 09:02:15 2018 daemon.info odhcpd[700]: Raising SIGUSR1 due to default route change
Wed Mar 21 09:02:15 2018 daemon.notice netifd: Interface 'wan6' is now up
Wed Mar 21 09:02:15 2018 daemon.info dnsmasq[1094]: reading /tmp/resolv.conf.auto
Wed Mar 21 09:02:15 2018 daemon.info dnsmasq[1094]: using nameserver 8.8.8.8#53
Wed Mar 21 09:02:15 2018 daemon.info dnsmasq[1094]: using nameserver 8.8.4.4#53
Wed Mar 21 09:02:15 2018 daemon.info dnsmasq[1094]: using nameserver 75.75.75.75#53
Wed Mar 21 09:02:15 2018 daemon.info dnsmasq[1094]: using nameserver 75.75.76.76#53
Wed Mar 21 09:02:15 2018 daemon.info dnsmasq[1094]: using local addresses only for domain lan
Wed Mar 21 09:02:15 2018 daemon.info dnsmasq[1094]: using nameserver 75.75.76.76#53
Wed Mar 21 09:02:15 2018 daemon.info dnsmasq[1094]: using nameserver 75.75.75.75#53
Wed Mar 21 09:02:15 2018 daemon.info dnsmasq[1094]: using nameserver 8.8.4.4#53
Wed Mar 21 09:02:15 2018 daemon.info dnsmasq[1094]: using nameserver 8.8.8.8#53
Wed Mar 21 09:02:15 2018 daemon.info dnsmasq[1094]: using nameserver 75.75.76.76#53
Wed Mar 21 09:02:15 2018 daemon.info dnsmasq[1094]: using nameserver 75.75.75.75#53
Wed Mar 21 09:02:15 2018 daemon.info dnsmasq[1094]: using nameserver 8.8.4.4#53
Wed Mar 21 09:02:15 2018 daemon.info dnsmasq[1094]: using nameserver 8.8.8.8#53
Wed Mar 21 09:02:15 2018 daemon.info dnsmasq[1094]: using nameserver 2001:558:feed::2#53
Wed Mar 21 09:02:15 2018 daemon.info dnsmasq[1094]: using nameserver 2001:558:feed::1#53
Wed Mar 21 09:02:15 2018 daemon.info dnsmasq[1094]: using nameserver 2001:4860:4860::8844#53
Wed Mar 21 09:02:15 2018 daemon.info dnsmasq[1094]: using nameserver 2001:4860:4860::8888#53
Wed Mar 21 09:02:15 2018 user.notice firewall: Reloading firewall due to ifup of wan6 (eth1)
Wed Mar 21 09:02:16 2018 daemon.info odhcpd[700]: Using a RA lifetime of 1800 seconds on br-lan
Wed Mar 21 09:02:16 2018 daemon.info odhcpd[700]: Raising SIGUSR1 due to address change on br-lan
Wed Mar 21 09:02:16 2018 daemon.info odhcpd[700]: Raising SIGUSR1 due to address change on eth1
Wed Mar 21 09:02:16 2018 daemon.info hostapd: wlan0: STA 64:bc:0c:84:2a:9f IEEE 802.11: authenticated
Wed Mar 21 09:02:16 2018 daemon.info hostapd: wlan0: STA 64:bc:0c:84:2a:9f IEEE 802.11: associated (aid 1)
Wed Mar 21 09:02:16 2018 daemon.notice hostapd: wlan0: AP-STA-CONNECTED 64:bc:0c:84:2a:9f
Wed Mar 21 09:02:16 2018 daemon.info hostapd: wlan0: STA 64:bc:0c:84:2a:9f WPA: pairwise key handshake completed (RSN)
Wed Mar 21 09:02:17 2018 daemon.info odhcpd[700]: Using a RA lifetime of 1800 seconds on br-lan
Wed Mar 21 09:02:18 2018 daemon.info odhcpd[700]: Using a RA lifetime of 1800 seconds on br-lan
Wed Mar 21 09:02:24 2018 kern.notice kernel: [   38.914308] random: nonblocking pool is initialized
Wed Mar 21 09:02:39 2018 daemon.info dnsmasq[1094]: read /etc/hosts - 4 addresses
Wed Mar 21 09:02:39 2018 daemon.info dnsmasq[1094]: read /tmp/hosts//odhcpd - 0 addresses
Wed Mar 21 09:02:39 2018 daemon.info dnsmasq[1094]: read /tmp/hosts//dhcp.cfg02411c - 2 addresses
Wed Mar 21 09:02:39 2018 daemon.info dnsmasq[1094]: read /tmp/hosts/odhcpd - 0 addresses
Wed Mar 21 09:02:39 2018 daemon.info dnsmasq[1094]: read /tmp/hosts/dhcp.cfg02411c - 2 addresses
Wed Mar 21 09:02:39 2018 daemon.info dnsmasq-dhcp[1094]: read /etc/ethers - 0 addresses
Wed Mar 21 09:03:20 2018 authpriv.info dropbear[1214]: Child connection from 192.168.1.244:50741
Wed Mar 21 09:03:29 2018 authpriv.notice dropbear[1214]: Password auth succeeded for 'root' from 192.168.1.244:50741
Wed Mar 21 09:03:29 2018 authpriv.info dropbear[1214]: Exit (root): Disconnect received
Wed Mar 21 09:03:29 2018 authpriv.info dropbear[1217]: Child connection from 192.168.1.244:50742
Wed Mar 21 09:03:33 2018 authpriv.notice dropbear[1217]: Password auth succeeded for 'root' from 192.168.1.244:50742
Wed Mar 21 09:03:33 2018 daemon.info dnsmasq[1094]: exiting on receipt of SIGTERM
Wed Mar 21 09:03:34 2018 daemon.info dnsmasq[1270]: started, version 2.78 cachesize 150
Wed Mar 21 09:03:34 2018 authpriv.info dropbear[1217]: Exit (root): Disconnect received
Wed Mar 21 09:03:34 2018 daemon.info dnsmasq[1270]: DNS service limited to local subnets
Wed Mar 21 09:03:34 2018 daemon.info dnsmasq[1270]: compile time options: IPv6 GNU-getopt no-DBus no-i18n no-IDN DHCP no-DHCPv6 no-Lua TFTP no-conntrack no-ipset no-auth no-DNSSEC no-ID loop-detect inotify
Wed Mar 21 09:03:34 2018 daemon.info dnsmasq-dhcp[1270]: DHCP, IP range 192.168.1.100 -- 192.168.1.249, lease time 47m
Wed Mar 21 09:03:34 2018 daemon.info dnsmasq[1270]: using nameserver 8.8.8.8#53
Wed Mar 21 09:03:34 2018 daemon.info dnsmasq[1270]: using nameserver 8.8.4.4#53
Wed Mar 21 09:03:34 2018 daemon.info dnsmasq[1270]: using nameserver 75.75.75.75#53
Wed Mar 21 09:03:34 2018 daemon.info dnsmasq[1270]: using nameserver 75.75.76.76#53
Wed Mar 21 09:03:34 2018 daemon.info dnsmasq[1270]: using local addresses only for domain lan
Wed Mar 21 09:03:34 2018 daemon.info dnsmasq[1270]: reading /tmp/resolv.conf.auto
Wed Mar 21 09:03:34 2018 daemon.info dnsmasq[1270]: using nameserver 8.8.8.8#53
Wed Mar 21 09:03:34 2018 daemon.info dnsmasq[1270]: using nameserver 8.8.4.4#53
Wed Mar 21 09:03:34 2018 daemon.info dnsmasq[1270]: using nameserver 75.75.75.75#53
Wed Mar 21 09:03:34 2018 daemon.info dnsmasq[1270]: using nameserver 75.75.76.76#53
Wed Mar 21 09:03:34 2018 daemon.info dnsmasq[1270]: using local addresses only for domain lan
Wed Mar 21 09:03:34 2018 daemon.info dnsmasq[1270]: using nameserver 75.75.76.76#53
Wed Mar 21 09:03:34 2018 daemon.info dnsmasq[1270]: using nameserver 75.75.75.75#53
Wed Mar 21 09:03:34 2018 daemon.info dnsmasq[1270]: using nameserver 8.8.4.4#53
Wed Mar 21 09:03:34 2018 daemon.info dnsmasq[1270]: using nameserver 8.8.8.8#53
Wed Mar 21 09:03:34 2018 daemon.info dnsmasq[1270]: using nameserver 75.75.76.76#53
Wed Mar 21 09:03:34 2018 daemon.info dnsmasq[1270]: using nameserver 75.75.75.75#53
Wed Mar 21 09:03:34 2018 daemon.info dnsmasq[1270]: using nameserver 8.8.4.4#53
Wed Mar 21 09:03:34 2018 daemon.info dnsmasq[1270]: using nameserver 8.8.8.8#53
Wed Mar 21 09:03:34 2018 daemon.info dnsmasq[1270]: using nameserver 2001:558:feed::2#53
Wed Mar 21 09:03:34 2018 daemon.info dnsmasq[1270]: using nameserver 2001:558:feed::1#53
Wed Mar 21 09:03:34 2018 daemon.info dnsmasq[1270]: using nameserver 2001:4860:4860::8844#53
Wed Mar 21 09:03:34 2018 daemon.info dnsmasq[1270]: using nameserver 2001:4860:4860::8888#53
Wed Mar 21 09:03:34 2018 daemon.info dnsmasq[1270]: read /etc/hosts - 4 addresses
Wed Mar 21 09:03:34 2018 daemon.info dnsmasq[1270]: read /tmp/hosts//odhcpd - 0 addresses
Wed Mar 21 09:03:34 2018 daemon.info dnsmasq[1270]: read /tmp/hosts//dhcp.cfg02411c - 2 addresses
Wed Mar 21 09:03:36 2018 daemon.info dnsmasq[1270]: read /tmp/hosts//custom_hosts - 65595 addresses
Wed Mar 21 09:03:36 2018 daemon.info dnsmasq[1270]: read /tmp/hosts/odhcpd - 0 addresses
Wed Mar 21 09:03:36 2018 daemon.info dnsmasq[1270]: read /tmp/hosts/dhcp.cfg02411c - 2 addresses
Wed Mar 21 09:03:37 2018 daemon.info dnsmasq[1270]: read /tmp/hosts/custom_hosts - 65595 addresses
Wed Mar 21 09:03:37 2018 daemon.info dnsmasq-dhcp[1270]: read /etc/ethers - 0 addresses
Wed Mar 21 09:03:38 2018 daemon.info odhcpd[700]: Raising SIGUSR1 due to address change on eth1
Wed Mar 21 09:03:38 2018 daemon.info odhcpd[700]: Raising SIGUSR1 due to address change on br-lan
Wed Mar 21 09:03:39 2018 daemon.info odhcpd[700]: Using a RA lifetime of 1800 seconds on br-lan

Now you need to find there the request you made in your tests, and the answer dnsmasq sent.

How do you test if it is/isn't blocking? I'd suggest tail /tmp/hosts/custom_hosts and then run nslookup for one of these domains on the router.

It's quite possible that your clients cached the previous (non-blocked) dns entries for the domains you want to block and that's why you're not experiencing the ad-blocking on your devices. Some mobile devices/OSes have DNS servers hardcoded, so you might need to do DNS Hijacking on your router. Finally, you might be hading out different DNS servers to use to your clients with dhcp options settings, so they are not even trying to query dnsmasq running on the router.

PS. You can save yourself some trouble and run simple-adblock package with just that one list you want. Dare I say it's more efficient in its NXDOMAIN replies than routing all requests back to 127.0.0.1. And for a more fledged ad blocking, why not try adblock?

I thought I'd turned off DNS caching by disabling it with a registry edit. When I manually add the domain to my windows hosts file it blocks it. And then I remove it and it's no longer blocked.

My device is the TL-WR841N. I don't know if it has enough space to install simple-adblock.

That entry above confirms that dnsmasq has loaded the file. If the entries are correct and you are really make a query directly to that router's DNS, it will be blocked.

If your client are not getting domains blacklisted, your troubleshooting effort should now be spent on verifying if the clients are really making DNS queries to that router, and not directly to an external DNS IP.

For example, running nslookup with an explicit NS server IP (router IP) for a hostname that is blocked:

nslookup zzz.clickbank.net 192.168.0.1
Server:         192.168.0.1
Address:        192.168.0.1#53

Name:   zzz.clickbank.net
Address: 0.0.0.0

My Windows 10:

nslookup gsmtop.net
Server:  cdns02.comcast.net
Address:  2001:558:feed::2

Non-authoritative answer:
Name:    gsmtop.net
Address:  103.224.212.222

My router:
nslookup gsmtop.net
Server:         127.0.0.1
Address:        127.0.0.1#53

Name:      gsmtop.net
Address 1: 0.0.0.0
*** Can't find gsmtop.net: No answer

How do I make my router the first dns server? Right now I think it's going the through these others before my router (192.168.1.177):

ipconfig /all
...
DNS Servers . . . . . . . . . . . : 2001:558:feed::2
                                    2001:558:feed::1
                                    2001:4860:4860::8844
                                    2001:4860:4860::8888
                                    192.168.1.177

I don't use Windows at all, so someone else might be able to advise you. Those v6 DNS IP are the same ones received by your router. Perhaps your Windows client is getting them via DHCPv6. You could try disabling DHCPv6 on your router and use RA to distribute v6 instead?

It's working:

nslookup gsmtop.net
Server:  MyRouterName.lan
Address:  fd68:b2a4:bb7d::1

Name:    gsmtop.net
Address:  0.0.0.0

I had set custom DNS servers on my interfaces. I deleted them everywhere. I still needed the DNS forwardings though. Side note: I was also able to re-enable my DNS client in Windows 10. Glad that's not necessary to do on every device that wants to use the adblocking.

Thanks everyone for getting me headed in the right direction.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.