9
I put these lines in my C:\Windows\System32\drivers\etc\hosts
file:
127.0.0.1 www.cnn.com
127.0.0.1 cnn.com
127.0.0.1 facebook.com
127.0.0.1 www.facebook.com
127.0.0.1 www.hotnews.ro
127.0.0.1 hotnews.ro
And I still manage to access these websites.
I restarted my computer, cleared the cache, different browsers, nothing works.
I am not using proxies. I use Windows 7/64 bit.
I flashed my DNS: ipconfig /flushdns
and when I ping the cnn.com I get reply from 157.166.226.25
What else can I do? Maybe there are some programs to modify the hosts and would work with them.
What's your OS? – gronostaj – 2014-08-13T20:26:38.413
@gronostaj Windows 7 – Claudiu Creanga – 2014-08-13T20:27:19.243
When you say
etc/hosts
, you meanc:\windows\system32\drivers\etc\hosts
, right? – aecolley – 2014-08-13T20:40:10.753host file to block sites? – Ben Plont – 2014-08-13T20:43:03.267
@aecolley yes, it is that file. I think it is something in my configuration. I tried on another laptop and it works fine in blocking those websites with the same file. Could it be because of dual boot? – Claudiu Creanga – 2014-08-13T20:43:41.237
@BenPlont Actually I need to redirect a website of mine to the IP of my new hosting server and DNS changes take up to 24h, so I wanted to test it locally sooner. But it seems that my hosts file is not working, since it cannot even block websites. – Claudiu Creanga – 2014-08-13T20:47:43.617
@Claudiu it's not working for another reason. Ping localhost now that you have defined it after a DNS flush – Ramhound – 2014-08-13T21:10:41.440
@Ramhound I get reply from
::1:
– Claudiu Creanga – 2014-08-13T21:14:14.640@Claudiu - That's an iPv6 address, its also, the correct IPv6 response. – Ramhound – 2014-08-13T21:18:38.030
Why would you change the hosts file to achieve what you want? You can make changes in your local dns server, that will reach your clients. – Alex – 2016-03-03T06:35:04.167
Just to eliminate the obvious, you are specifying specific websites, with non wildcards. Is www.facebook.com being blocked while www.login.facebook.com still accesible? – user2676140 – 2016-07-11T19:59:16.970