Internet, Networking, and Wireless Discussion of networking, internet, and wireless including Apple's Airport products.

Blocking sites using Hosts file


Post Reply New Thread Subscribe

 
Thread Tools
yonyz

 
Member Since: Mar 13, 2012
Posts: 17
yonyz will become famous soon enough

yonyz is offline
Hi,

I followed a guide to blocking websites by change OS X's hosts file. I then ran the command 'cat /etc/hosts' and indeed the changes were made. Unfortunately, the websites I included in the file are not blocked. Example: I entered 0.0.0.0 nrg.co.il. That didn't work, as Safari redirects me to מעריב - חדשות, כלכלה, ספורט ובידור מהארץ ומהעולם nrg. So I change it to 0.0.0.0 *.nrg.co.il. Still doesn't work. Am I doing it wrong? Attached is a shot of the hosts file list.
Attached Images
File Type: png Screen Shot 2012-04-01 at 9.23.30 PM.png (51.0 KB, 15 views)
QUOTE Thanks
Raz0rEdge

 
Raz0rEdge's Avatar
 
Member Since: Jul 17, 2009
Location: MA
Posts: 5,850
Raz0rEdge has much to be proud ofRaz0rEdge has much to be proud ofRaz0rEdge has much to be proud ofRaz0rEdge has much to be proud ofRaz0rEdge has much to be proud ofRaz0rEdge has much to be proud ofRaz0rEdge has much to be proud ofRaz0rEdge has much to be proud ofRaz0rEdge has much to be proud of
Mac Specs: 27" i7 iMac with 16GB RAM and 1TB HDD, iPhone 3G & 4, iPod Nano 16GB, iPod Shuffle, iPad 2 16GB WiFi

Raz0rEdge is offline
Try setting the sites you want to block to point to 127.0.0.1 instead of 0.0.0.0 which is a multicast broadcast group or address or something..

127.0.0.1 is localhost (your local machine), so any access to that will just stay within your computer..

--
Regards
...Ashwin



Be sure to read the Community Guidelines | The more information you provide, the better answers you get, remember GIGO.
QUOTE Thanks
yonyz

 
Member Since: Mar 13, 2012
Posts: 17
yonyz will become famous soon enough

yonyz is offline
Unfortunately, same (no) result.
QUOTE Thanks
vansmith

 
vansmith's Avatar
 
Member Since: Oct 19, 2008
Location: Ottawa
Posts: 15,329
vansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond repute
Mac Specs: 2012 13" MBP (2.5 i5, 8GB)

vansmith is offline
Have you flushed your DNS cache? If not, execute the following:
Code:
sudo dscacheutil -flushcache
If that doesn't work, try removing the "*." from the beginning of the domain.

Important Links: Community Guidelines : Use the reputation system if you've been helped.
M-F Blog :: Write for the blog :: M-F IRC Channel - Chats every Sunday at 8PM EST.
QUOTE Thanks
yonyz

 
Member Since: Mar 13, 2012
Posts: 17
yonyz will become famous soon enough

yonyz is offline
Tried both, still doesn't work.
QUOTE Thanks

Post Reply New Thread Subscribe


« Using Time Capsule with DSL Router | ? about iCloud contact groups »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting 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 Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
SonicWALL blocking random sites. colormesassy Internet, Networking, and Wireless 0 03-19-2010 02:14 PM
Need help with editing my hosts file BlackOut117 OS X - Operating System 4 08-28-2008 06:13 AM
My PowerMac G5 is acting screwy! aedolch OS X - Operating System 5 08-01-2008 06:12 PM
Unix Executable File problem fender1100 OS X - Apps and Games 9 01-07-2007 06:20 AM
Open Letter to Apple Saint Mark Switcher Hangout 23 08-15-2006 03:15 AM

All times are GMT -4. The time now is 05:55 PM.

Powered by vBulletin
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?