Trying to block some ad domain using hosts file

dns
solved

#1

Just like Entries in Hosts file or in custom hosts file ignored, I am also trying to blacklist some urls via the hosts file. I have updated the /etc/hosts file and added the entry in it.

My problem is I can ping the one test domain entry that I have placed in /etc/hosts file using ping at /luci/admin/network/diagnostics. BUT, I can not resolve the entry from my computer. I am not using any custom settings for IP or DNS. IPCONFIG shows the DNS on my computer is the TO’s address.

I have tried to follow DNS tricks for Omnia and knot-resolver

Now we are in version 4.4, I do not know if I have to do anything else other then adding an entry in hosts file.


#2

By default, /etc/hosts is meant just for the single machine. See the wiki entry.


#3

Then, how do I block a domain on my entire network connected to the router?


#4

The link I posted explains how to simply change that default.


#5

Sorry, I didn’t read well. I had to go two more times before I understood what to do. It’s working now. Thank you.
I just had to follow the direction well.