Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

how to forever block certain websites

Posted on 2011-09-07
10
Medium Priority
?
1,671 Views
Last Modified: 2013-12-24
I have a home office, and I need to keep distractions down to a minimum to get work done. There are some websites that I know I waste too much time on. And they aren't necessary. I'm wondering if there is some way I can make it so that these websites get permanently blocked from me. Does that make sense? I mean, I know there are family filters and stuff that parents set up for their kids. Obviously the kids would need a password to change the filter. But in my case, it's just me....

Any ideas?
0
Comment
Question by:gregholl
  • 5
  • 3
9 Comments
 
LVL 1

Author Comment

by:gregholl
ID: 36499543
I forgot to mention. I'm on a MAC Snow Leopard
0
 
LVL 8

Accepted Solution

by:
JT92677 earned 2000 total points
ID: 36500086
The way to do this is to redirect all requests for a certain URL back to the local host machine.

This is done by editing the HOSTS file in the etc directory of your Mac.

If you want to stop someone from accessing a site, like http://www.keepout.com

in the hosts file you would add

127.0.0.1    keepout.com

The solution is to add all the forbidden sites to the hosts file and instead of using
a DNS lookup, the Mac will simply look at the HOSTS file, see the reference, and
direct the browser to the 127.0.0.1 IP address, which is the "local host" machine
e.g. your local macbook.

To edit the hosts file, just follow the instructions here:

http://osxdaily.com/2007/03/19/block-access-to-specified-sites-by-modifying-etchosts/

Hope this helps. It is the answer.

Jeff
0
 
LVL 21

Expert Comment

by:Papertrip
ID: 36500089
@JT92677 -- what prevents from him undoing those changes?
0
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 
LVL 8

Expert Comment

by:JT92677
ID: 36500167
Good question:

The process requires you to enter your main password, as it does to do some (but not all)
things on the mac that change the way it operates.

So whoever you're blocking would need your password to make changes to the hosts file

Jeff
0
 
LVL 8

Expert Comment

by:JT92677
ID: 36500235
Papertrip:

So he blocks himself or anyone using his machine.

 If he wants to unblock himself, it would require a few steps, including entering his password.

Suggesting that he terminate his ISP account seemed like a "I have no idea aside from pulling the plug" type of solution.
0
 
LVL 8

Expert Comment

by:JT92677
ID: 36500273
Greg -- One more thing, be sure to do the following

Use a SINGLE tab character between the 127.0.0.1 and the URL you want to block
Not spaces

\Be sure to add at least one line after the entry

A good entry after that is to put in a comment

# I am blocking the above URL by redirecting it to the local host 127.0.0.1

then Control-O (output) then Control X  (exit) then close the terminal window.

If you run the "Network Utility" app, and use the PING function, try pinging to the URL
of the site you want to block.

You should see a response from 127.0.0.1 if you did things correctly.

Jeff

Jeff
0
 
LVL 8

Expert Comment

by:JT92677
ID: 36500311
Greg -- did you try the solution?  There is nothing in my remarks that is a flame against  you, or a flame against the other questioner.

You know, we try to be helpful, it takes time, and I sure hope you aren't blaming me for the other person's questions and my response.

The solution is the HOSTS file, I've tested it here on my MacBook Pro, and it works fine.

Jeff
0
 
LVL 1

Author Comment

by:gregholl
ID: 36500366
Yeah. I'm going to try that, Meanwhile, how do i delete papertrip's comments?
0
 
LVL 1

Author Closing Comment

by:gregholl
ID: 36510393
thanks
0

Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Tech spooks aren't just for those who are tech savvy, it also happens to those of us running a business. Check out the top tech spooks for business owners.
When you put your credit card number into a website for an online transaction, surely you know to look for signs of a secure website such as the padlock icon in the web browser or the green address bar.  This is one way to protect yourself from oth…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

876 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question