Announcement

Collapse
No announcement yet.

Editing etc/hosts

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Editing etc/hosts

    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!

    #2
    Re: Editing etc/hosts

    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.
    Windows no longer obstructs my view.
    Using Kubuntu Linux since March 23, 2007.
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    Comment


      #3
      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.

      Comment


        #4
        Originally posted by Detonate View Post
        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.
        "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
        – John F. Kennedy, February 26, 1962.

        Comment

        Working...
        X