Why is whitelisting in hosts file not working?

0

The hosts file on Windows 10 has been edited with IP's and website name after as instructed here Allow only white-listed sites on Windows 10

#allowed sites
173.194.33.128 google.com
198.252.206.16 superuser.com
#blah blah, more sites here

#blocked sites
<paste the contents of http://pastebin.com/63hfPx8M here>"

However I am still able to access the non-whitelisted webpages.

John

Posted 2020-01-11T15:24:11.043

Reputation: 1

1

Have you removed the DNS server configuration for the network interface? The hosts file is just the first source, if it does not contain the asked server address the standard DNS server configured is asked. But I doubt that this will work good for Google. google.com is a service hosted in the cloud with no fixed IP address. Therefore the IP address can change at any time. I would strongly recommend to use a real DNS server for that purpose, one common system is https://pi-hole.net which can provide the service it for a whole subnet on a Raspberry Pi.

– Robert – 2020-01-11T16:04:51.363

IMO this is a really bad way to create a "whitelist" (which it really isn't), mostly for the fact that it completely ignores all of the advantages of the DNS system, such as (geographic) load balancing and will quickly lead to sites not working at all or slower than they should. It's a headache to maintain. I would consider OpenDNS or a similar service. – StarCat – 2020-01-11T18:55:38.407

No answers