Blocking a Specific site in safari...

Discussion in 'Mac Basics and Help' started by Mr. MacBook, Jun 25, 2007.

  1. Mr. MacBook macrumors 6502

    Joined:
    Feb 28, 2007
    #1
    Ok, until i know how to, i will be using firefox.

    I am tired of my brother sneaking on my Mac to play freaking RUNESCAPE in the middle of the night. He's older than me, i sold my runescape account for $305 dollars, but he insists that he must play RUNESCAPE.

    I, however, dont want him screwing around with my mac.

    Is there any way to block that site, or set a specific password when you go to it that you need to enter?

    And dont tell me to use the parental controls. I only have ONE account, and its an admin, and id prefer to leave it that way. Plus, the box is grayed out and unclickable, so NO.
     
  2. jsw Moderator emeritus

    jsw

    Joined:
    Mar 16, 2004
    Location:
    Andover, MA
    #2
    You can alter the DNS lookup on your Mac to point that name to anywhere you want.
     
  3. Mr. MacBook thread starter macrumors 6502

    Joined:
    Feb 28, 2007
    #3
    ...no idea what your talking about :cool:


    but the idea of redirecting the name to somewhere else is cool, so if you could send me more info on how to do this it would be nice. Use my brother's PC <3 to my advantage.
     
  4. hanschien macrumors 6502

    hanschien

    Joined:
    Oct 2, 2006
    Location:
    Houston, TX
    #4
    open Terminal.app
    type: sudo pico /etc/hosts
    type: admin password
    arrow down to a new line
    enter the IP address of a site you want to redirect to (www.google.com = 64.233.161.99)
    tab over then enter the site you want to block (whatever.com)
    type: ctrl + x
    type: y
    press: enter
     
  5. Mr. MacBook thread starter macrumors 6502

    Joined:
    Feb 28, 2007
    #5
    i got nothing, id like to stick to something simpler please.


    wow why cant any internet browser put this in. I'm getting real sick of it, the browsers try and impress everyone with advanced security features but dont put stuff like this in.
     
  6. hanschien macrumors 6502

    hanschien

    Joined:
    Oct 2, 2006
    Location:
    Houston, TX
    #6
    password protect your computer...:rolleyes:
     
  7. Mr. MacBook thread starter macrumors 6502

    Joined:
    Feb 28, 2007
    #7
    i like leaving my computer on, thank you very much. Btw, it's already protected, but i like the idea of shocking him.
     
  8. jsw Moderator emeritus

    jsw

    Joined:
    Mar 16, 2004
    Location:
    Andover, MA
    #8
    If you do those steps, you'll stop anyone from accessing any site you want from any browser unless they too know how to edit the /etc/hosts file.

    The steps are easy enough, but to reiterate:

    • open Applications->Utilities->Terminal
    • type "sudo pico /etc/hosts" and hit return
    • enter your admin password, which is probably just your password, and hit return
    • arrow down to past the last line (i.e., until the cursor's at the start of a blank line at the bottom)
    • type an IP address (like 17.254.3.183), then hit the tab key, then type www.runescape.com
    • hold the control key and press 'x'
    • press 'y'
    • press return

    It's cake.
     
  9. Luis macrumors 65816

    Luis

    Joined:
    Jul 19, 2006
    Location:
    Costa Rica
    #9
    Very cool little trick, however you lost me on the "tab over" part, are we supposed to just press tab once or what?


    EDIT: sorry i'm slow. Thanks JSW
     
  10. jsw Moderator emeritus

    jsw

    Joined:
    Mar 16, 2004
    Location:
    Andover, MA
    #10
    Note that you can repeat the trick given by hanschien as many times as you want to block or redirect multiple sites.
    (a) Because you could use any other browser to go to the site, and (b) because it opens a huge security hole.
     
  11. hanschien macrumors 6502

    hanschien

    Joined:
    Oct 2, 2006
    Location:
    Houston, TX
    #11
    Thanks jsw :) I could never be a help desk tech...
     
  12. jsw Moderator emeritus

    jsw

    Joined:
    Mar 16, 2004
    Location:
    Andover, MA
    #12
    You did all the hard work :)


    One further question: how do you get it to take effect without a reboot? It's clearly not taking place immediately.
     
  13. hanschien macrumors 6502

    hanschien

    Joined:
    Oct 2, 2006
    Location:
    Houston, TX
    #13
    it works for me
     
  14. iMeowbot macrumors G3

    iMeowbot

    Joined:
    Aug 30, 2003
    #14
    Just wait a minute or two, the resolver only seems to poll /etc/hosts periodically.
     
  15. hanschien macrumors 6502

    hanschien

    Joined:
    Oct 2, 2006
    Location:
    Houston, TX
    #15
    Wild cards doesn't seem to work *.apple.com for example.
     

Share This Page