Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Mr. MacBook

macrumors 6502
Original poster
Feb 28, 2007
337
0
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.
 
You can alter the DNS lookup on your Mac to point that name to anywhere you want.

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

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
 
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

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.
 
i got nothing, id like to stick to something simpler please.
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.
 
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

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
 
Note that you can repeat the trick given by hanschien as many times as you want to block or redirect multiple sites.
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.
(a) Because you could use any other browser to go to the site, and (b) because it opens a huge security hole.
 
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.

Thanks jsw :) I could never be a help desk tech...
 
One further question: how do you get it to take effect without a reboot? It's clearly not taking place immediately.
Just wait a minute or two, the resolver only seems to poll /etc/hosts periodically.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.