Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Applications > blocking sites?

blocking sites?
Thread Tools
Senior User
Join Date: Jun 2006
Status: Offline
Reply With Quote
Jul 2, 2007, 08:38 PM
 
i read on here a while back that in the apple stores that apple has blocked customers from browsing myspace. i would like to do the same thing at work and maybe youtube also. anybody got any idea how to do this? we're running 10.3.9 along with safari and firefox.
thanks!
imac g3 600
imac g4 800 superdrive
ibook 466
     
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Jul 2, 2007, 08:58 PM
 
Create firewall rules blocking outgoing connections to the IP(s) belonging to the site in question.
     
Posting Junkie
Join Date: Oct 2005
Location: Houston, TX
Status: Online
Reply With Quote
Jul 2, 2007, 09:00 PM
 
Add entries in your hosts file directing them elsewhere (like Google) or nowhere (like 127.0.0.1). That way you don't have to keep track of the (many) IPs that myspace/youtube/etc may use.
     
gooser  (op)
Senior User
Join Date: Jun 2006
Status: Offline
Reply With Quote
Jul 2, 2007, 10:25 PM
 
well, it looks like there is a solution for my question and thanks to both of you. unfortunately i have no idea how to do either one of those things. more detail?
create firewall rules?..... host files?........
imac g3 600
imac g4 800 superdrive
ibook 466
     
P
Moderator
Join Date: Apr 2000
Location: Gothenburg, Sweden
Status: Offline
Reply With Quote
Jul 3, 2007, 04:22 AM
 
host files: There is a file in /etc called hosts that is a sort of override for the regular DNS. Google "/etc/hosts mac".

Firewall blocking rules: To add outgoing blocking rules, you either need to modify the config file or use a third-party firewall program. Try versiontracker.com and search for "firewall".
     
Posting Junkie
Join Date: Oct 2005
Location: Houston, TX
Status: Online
Reply With Quote
Jul 3, 2007, 05:09 PM
 
Open up the file /etc/hosts with a text editor. It will look something like:

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost

Add the lines for the sites you want to block to the end of the file. Something like

127.0.0.1 myspace.com
127.0.0.1 youtube.com

if you want them to get 'nothing' when they go to those sites, or something like

72.14.207.99 myspace.com
72.14.207.99 youtube.com

if you want to send them to Google when they go to those sites.
     
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Jul 3, 2007, 05:15 PM
 
If you edit /etc/hosts, you will likely have to flush your DNS cache before the changes take effect.

To do so:

sudo lookupd -flushcache
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 03:32 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2