Editing Hosts file

Discussion in 'macOS' started by pulsewidth947, Jun 23, 2006.

  1. pulsewidth947 macrumors 65816

    pulsewidth947

    Joined:
    Jan 25, 2005
    Location:
    squarefrog.co.uk
    #1
    Hi!

    I'm sick of kicking students off myspace when they should be doing work so I've decided to block it once and for all! Muahaha. I've found the Hosts file in /etc/ and I added
    which works wonderfully, but you can still access www.myspace.com. I tried to add that address in the Hosts file, but it doesnt block it - it loads as if it didnt exsist.

    I tried a couple of different browsers to check it wasnt cached

    Any suggestions?
    Thanks.
     
  2. realityisterror macrumors 65816

    realityisterror

    Joined:
    Aug 30, 2003
    Location:
    Snellville, GA
    #2
    Try blocking the IP addresses of their nameservers?

    NS1.MYSPACE.COM 204.74.66.247
    NS2.MYSPACE.COM 204.74.67.247

    I'm not at all sure if that'll work, but I think it should.

    Good luck
     
  3. ChrisBrightwell macrumors 68020

    ChrisBrightwell

    Joined:
    Apr 5, 2004
    Location:
    Huntsville, AL
    #3
    OS X does its best to ignore the HOSTS file. You have to configure it through the NetInfo Manager.
     
  4. superbovine macrumors 68030

    superbovine

    Joined:
    Nov 7, 2003
    #4
    is your os x box you dns server? you should probably be doing this in your dns server. this way it will be a global change rather than each box.

    however, to answer your question:

    use host.deny and wildcards.

    http://www.macos.utah.edu/Documentation/macosx/security/tcpwrappers.html

    or you can do it at the network level and just create an acl on your router on the hardware level (layer 3 of the osi model).
     
  5. pulsewidth947 thread starter macrumors 65816

    pulsewidth947

    Joined:
    Jan 25, 2005
    Location:
    squarefrog.co.uk
    #5
    Thanks for your replies.

    I couldnt work out how to use NetInfo Manager. I started following instructions off an O'Reilly website, but got frustrated because I didnt understand.

    I'll try blocking the name servers. I know I should be doing this on the DNS server, well I could get myspace added to the blocks on our proxy, but 1 group of students need to use it some times for music, but as its a seperate room, using Hosts would allow this.
     
  6. pulsewidth947 thread starter macrumors 65816

    pulsewidth947

    Joined:
    Jan 25, 2005
    Location:
    squarefrog.co.uk

Share This Page