jnelsoninjax Posted January 16, 2017 Share Posted January 16, 2017 I am attempting to block a website using the hosts file in win10. I am using the format 127.0.0.1 site.name (does it mater if it's just domain.com does it need the http in front?), saving it (using notepad w/ admin privileges) and then double checking the file. I have even reset the system and it still seems to just ignore the fact that the site in question is blocked. Am I doing something incorrect, or is there something else that needs to be done? Draconian Guppy 1 Share Link to comment Share on other sites More sharing options...
Circaflex Posted January 16, 2017 Share Posted January 16, 2017 Just now, jnelsoninjax said: I am attempting to block a website using the hosts file in win10. I am using the format 127.0.0.1 site.name, saving it (using notepad w/ admin privileges) and then double checking the file. I have even reset the system and it still seems to just ignore the fact that the site in question is blocked. Am I doing something incorrect, or is there something else that needs to be done? What browser are you testing this with? Link to comment Share on other sites More sharing options...
jnelsoninjax Posted January 16, 2017 Author Share Posted January 16, 2017 Just now, Circaflex said: What browser are you testing this with? FF 50.1.0 Draconian Guppy 1 Share Link to comment Share on other sites More sharing options...
kurupy Posted January 16, 2017 Share Posted January 16, 2017 Instead of 127.0.0.1, try 0.0.0.0. I currently use https://github.com/StevenBlack/hosts to filter traffic, an thats what they use. Hope it helps Link to comment Share on other sites More sharing options...
jnelsoninjax Posted January 16, 2017 Author Share Posted January 16, 2017 1 minute ago, kurupy said: Instead of 127.0.0.1, try 0.0.0.0. I currently use https://github.com/StevenBlack/hosts to filter traffic, an thats what they use. Hope it helps I tried the 0.0.0.0 as well, I noticed that address was in the hosts file already from another program, and I tried replicating that as well, at this point IDK if the issue is that the site is cached and FF is loading the cached version or if there's something else going on. Draconian Guppy 1 Share Link to comment Share on other sites More sharing options...
sc302 Veteran Posted January 16, 2017 Veteran Share Posted January 16, 2017 If I wanted to block google with a host file this is what I would do127.0.0.1 google.comSent from my iPhone using Tapatalk Circaflex 1 Share Link to comment Share on other sites More sharing options...
Circaflex Posted January 16, 2017 Share Posted January 16, 2017 1 minute ago, jnelsoninjax said: I tried the 0.0.0.0 as well, I noticed that address was in the hosts file already from another program, and I tried replicating that as well, at this point IDK if the issue is that the site is cached and FF is loading the cached version or if there's something else going on. Try clearing the cache and attempt to visit the website again. Link to comment Share on other sites More sharing options...
jnelsoninjax Posted January 16, 2017 Author Share Posted January 16, 2017 7 minutes ago, Circaflex said: Try clearing the cache and attempt to visit the website again. No effect. Site still loads just fine. Also just a FYI the FF has no extensions installed, so there is no conflict there. Draconian Guppy 1 Share Link to comment Share on other sites More sharing options...
exotoxic Posted January 16, 2017 Share Posted January 16, 2017 Did you try cleaning the DNS cache? cmd --> ipconfig /flushdns Link to comment Share on other sites More sharing options...
jnelsoninjax Posted January 16, 2017 Author Share Posted January 16, 2017 8 minutes ago, sc302 said: If I wanted to block google with a host file this is what I would do 127.0.0.1 google.com Sent from my iPhone using Tapatalk That is exactly how I have it setup: 127.0.0.1 website.com I also have it as 0.0.0.0 website.com Draconian Guppy 1 Share Link to comment Share on other sites More sharing options...
xendrome Posted January 16, 2017 Share Posted January 16, 2017 FF might be using some type of DNS acceleration or cached DNS inside of its self. Maybe ignoring the host file, does it block when you use IE? Link to comment Share on other sites More sharing options...
jnelsoninjax Posted January 16, 2017 Author Share Posted January 16, 2017 Just now, exotoxic said: Did you try cleaning the DNS cache? cmd --> ipconfig /flushdns Had not thought about that, I give it a go. Draconian Guppy 1 Share Link to comment Share on other sites More sharing options...
jnelsoninjax Posted January 16, 2017 Author Share Posted January 16, 2017 6 minutes ago, jnelsoninjax said: Had not thought about that, I give it a go. Again, nothing. Tried in Edge, still goes through Draconian Guppy 1 Share Link to comment Share on other sites More sharing options...
Circaflex Posted January 16, 2017 Share Posted January 16, 2017 Random thought, but have you tried rebooting after making the edits and attempting to visit the webpage? Link to comment Share on other sites More sharing options...
+Fulcrum Subscriber¹ Posted January 16, 2017 Subscriber¹ Share Posted January 16, 2017 If flushdns doesn't work. I'm not sure if Windows 10 has this, but on W7, I have to click "Enable LMHOSTS lookup" for it to apply. KingCracker 1 Share Link to comment Share on other sites More sharing options...
sc302 Veteran Posted January 16, 2017 Veteran Share Posted January 16, 2017 Why not use opendns or some other block to block the sites you don't want them or yourself to visit. There are far better solutions than to use a host file. Sent from my iPhone using Tapatalk Link to comment Share on other sites More sharing options...
jnelsoninjax Posted January 16, 2017 Author Share Posted January 16, 2017 1 minute ago, Circaflex said: Random thought, but have you tried rebooting after making the edits and attempting to visit the webpage? Not every time, but after initial change I rebooted the machine. So far I have 1) Cleared the Cache 2)Flushed the DNS 3) Removed all cookies. @sc302, I am going to do that now! I realized just as you said it that I have the router configured to use OpenDNS and Google's DNS as well, I check which one is the primary (hopefully OpenDNS) Draconian Guppy 1 Share Link to comment Share on other sites More sharing options...
sc302 Veteran Posted January 16, 2017 Veteran Share Posted January 16, 2017 If you create an account with opendns, you will be able to add your site/house/home internet and block access by category or by site name. It is free to setup. Link to comment Share on other sites More sharing options...
jnelsoninjax Posted January 17, 2017 Author Share Posted January 17, 2017 1 hour ago, sc302 said: If you create an account with opendns, you will be able to add your site/house/home internet and block access by category or by site name. It is free to setup. Well it turns out that there is no way to set the router (Linksys WRT1900AC) to use OpenDNS, it will always default to the ISP's DNS server, which is asinine, but after some extensive research I have determined that to be the case for this router, at least until I install and open source firmware on it. Draconian Guppy 1 Share Link to comment Share on other sites More sharing options...
Circaflex Posted January 17, 2017 Share Posted January 17, 2017 1 hour ago, jnelsoninjax said: Well it turns out that there is no way to set the router (Linksys WRT1900AC) to use OpenDNS, it will always default to the ISP's DNS server, which is asinine, but after some extensive research I have determined that to be the case for this router, at least until I install and open source firmware on it. I assume you are using a static IP if that is the case? If it is dynamic, yu can use a different DNS. You do that by providing the OpenDNS IPs in the DHCP Server settings on the Local Network tab of the Connectivity page. they also have a config page here for that router https://support.opendns.com/hc/en-us/articles/228008007-Configuration-for-Linksys-Cisco-AC175-EA6300-EA6500-EA6900-WRT1900AC Link to comment Share on other sites More sharing options...
sc302 Veteran Posted January 17, 2017 Veteran Share Posted January 17, 2017 1 hour ago, jnelsoninjax said: Well it turns out that there is no way to set the router (Linksys WRT1900AC) to use OpenDNS, it will always default to the ISP's DNS server, which is asinine, but after some extensive research I have determined that to be the case for this router, at least until I install and open source firmware on it. you are looking in the wrong place. change the dns to point to opendns in the below screenshot. some give you the opportunity to change it in the internet setting tab (or whatever the equivalent terminology is in the different hardware manufacturers gui), others you change it in the local area connection, LAN or DHCP location). Link to comment Share on other sites More sharing options...
jnelsoninjax Posted January 17, 2017 Author Share Posted January 17, 2017 1 hour ago, Circaflex said: I assume you are using a static IP if that is the case? If it is dynamic, yu can use a different DNS. You do that by providing the OpenDNS IPs in the DHCP Server settings on the Local Network tab of the Connectivity page. they also have a config page here for that router https://support.opendns.com/hc/en-us/articles/228008007-Configuration-for-Linksys-Cisco-AC175-EA6300-EA6500-EA6900-WRT1900AC Thanks for that info! 19 minutes ago, sc302 said: you are looking in the wrong place. change the dns to point to opendns in the below screenshot. some give you the opportunity to change it in the internet setting tab (or whatever the equivalent terminology is in the different hardware manufacturers gui), others you change it in the local area connection, LAN or DHCP location). You're correct, I was reading/looking in the wrong spot on the config page! Draconian Guppy 1 Share Link to comment Share on other sites More sharing options...
jnelsoninjax Posted January 17, 2017 Author Share Posted January 17, 2017 Success! I finally got it to block the site in question via OpenDNS! Talk about a giant PITA, but I finally got it. sc302, Circaflex and Draconian Guppy 3 Share Link to comment Share on other sites More sharing options...
goretsky Supervisor Posted January 17, 2017 Supervisor Share Posted January 17, 2017 Hello, Can I ask what the site was? Regards, Aryeh Goretsky Link to comment Share on other sites More sharing options...
+BudMan MVC Posted January 17, 2017 MVC Share Posted January 17, 2017 Did you bother to do a simple test if host file entry was being used? Edit host file as admin, put in your entries and then try and ping.. If this something else has been looked up recently then you would need to flush the cache.. This really is clickity clickity stuff.. So couple things - your browser had it cached, using a proxy so it doesn't even ask local system or dns - the proxy gets asked, etc. Your running some antivirus that prevents changes to hosts file sort of thing.. But its like 2 seconds to validate if what your putting in the host file is being used.. You have to make sure what your putting in the host file is what is actually being looked up too.. ie if your not going to say www.google.com then google.com would work, etc. Link to comment Share on other sites More sharing options...
Recommended Posts