TechSpot

Blocking sites via host file

By iambinary1
Mar 19, 2009
  1. kimsland

    kimsland Ex-TechSpotter Posts: 14,524

    Hmm it connected for me too :(

    Here's what to do :)

    Start->Run-> C:\WINDOWS\SYSTEM32\DRIVERS\ETC ->ok

    Right Click on HOSTS file, and select Properties
    Remove the Read Only tick
    Apply OK

    Double click to Open HOSTS file
    Open with Notepad
    Add these lines:
    Code:
    209.85.171.100 facebook.com
    209.85.171.100 www.facebook.com
    Close and save HOSTS file

    Open up Internet Explorer or Firefox (or whatever browser you use)
    Go to: www.facebook.com

    Google will open :grinthumb
     
  2. iambinary1

    iambinary1 TS Rookie Topic Starter Posts: 17

    Great! It works wonders. Thank you.

    I'm wondering, though, how you found the IP address for Google.
     
  3. kimsland

    kimsland Ex-TechSpotter Posts: 14,524

    Here's two ways ;)

    1.

    Start->Run-> CMD -> ok
    Type in Ping www.google.com and then press Enter key
    Your Google IP will be shown


    2.

    Go to: http://www.selfseo.com/find_ip_address_of_a_website.php
    Please note I just chose a random site that does this (there may be better ones)
    "Enter URL:" www.google.com Get IP

    Done :grinthumb


    Edit:

    You might want to put the "Read Only" attribute back on the Hosts file again, for security
     
Topic Status:
Not open for further replies.

Similar Topics

Add New Comment

You need to be a member to leave a comment. Join thousands of tech enthusiasts and participate.
TechSpot Account You may also...