Block access to a website

Discussion in 'Mac Basics and Help' started by kerpow, Feb 27, 2007.

  1. kerpow macrumors 6502

    Joined:
    Jan 16, 2004
    Location:
    London
    #1
    I wan to block access to a website on a Mac. In the Windows world the simplest way to do this is to open the Hosts file and add a fake DNS entry for the site eg.

    10.0.0.1 www.website.com

    Your average user will have no idea how to fix this.

    Whats the simplest way to do this on a Mac without having to buy software?
     
  2. 4np macrumors 6502a

    4np

    Joined:
    Feb 23, 2005
    Location:
    The Netherlands
    #2
    The same: by editting /etc/hosts....

    A weird thing in a mac though is that the lookup order is different than on your average windows machine; if you want to use the hosts file to overrule a domain name you should also change the lookup order. You can do this by executing the following commands:

    source: http://www.geektimes.com/macintosh/os/x/10_3/and/dns.html

    and restart lookupd by executing a:

    If you don't want to edit your hosts file and the lookup order, you can use the netinfo manager (in applications/utilities).

    If you want to do this company wide you could add an entry to your local DNS server (if you run one).
     
  3. eddorey2k3 macrumors newbie

    Joined:
    Feb 27, 2007
    Location:
    England.
  4. kerpow thread starter macrumors 6502

    Joined:
    Jan 16, 2004
    Location:
    London
    #4
    Figured it would be some file or other to edit. I'll give that a go.

    Thanks
     
  5. djdawson macrumors member

    djdawson

    Joined:
    Apr 28, 2005
    Location:
    Minnesota
    #5
    This is no longer needed in Tiger, and I don't think it was necessary in 10.3, either. I've never bothered with the lookup order and I put stuff in my /etc/hosts all the time. It just works.

    HTH
     
  6. bubbleboy450 macrumors newbie

    Joined:
    Dec 8, 2007
    #6
    Youtube Addict

    I am sure that there are lots of other people trying to do the same thing. I don't want anyone on my computer to be able to access youtube, or facebook. I have tried editing my hosts file
    sudo pico /ect/hosts (some recomend, sudo nano....)
    i put in

    127.0.0.1 youtube.com

    Also have tried

    127.0.0.1 www.youtube.com

    and everyother combination of spaces, and tabs imaginable.

    then hit crtl-o to save, and press y. All it says is "bus error" and doesn't save it. pressing crtl-x does the same thing. No mater what i do, it always says, "bus error".
    Any ideas how i can get youtube baned from my computer for good? Making a second account is not an option.
    P.s Using leopard. 10.5.1
     

Share This Page