View Full Version : Editing etc/hosts
anubis666
Jan 22nd 2012, 05:34 PM
I've edited my hosts file to block certain websites, but it doesn't work on all sites I've blocked.
On top of that, for the ones it does work on, it only works when going directly to the site. If I follow a link to the site, it will always display it anyway. Is there something else I need to do other than:
127.0.0.1 website.com
Thanks!
Snowhog
Jan 22nd 2012, 06:45 PM
When including entries in /etc/hosts of sites you want blocked, use the syntax:
0.0.0.0 website
So, if you want to prevent access to youtube or facebook, you would add these two entries:
0.0.0.0 www.youtube.com
0.0.0.0 www.facebook.com
This works.
Detonate
Jan 24th 2012, 05:17 PM
Even though you may block a website in your etc/hosts file, it will still open from a link on another page if the link on that pages uses the IP address of the site instead of the name of the site.
GreyGeek
Jan 24th 2012, 06:59 PM
Even though you may block a website in your etc/hosts file, it will still open from a link on another page if the link on that pages uses the IP address of the site instead of the name of the site.
For those cases, at least the important ones, IPtables may help.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.