Solved

how to forever block certain websites

Posted on 2011-09-07
10
1,618 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
10 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 500 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
 
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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Data center, now-a-days, is referred as the home of all the advanced technologies. In-fact, most of the businesses are now establishing their entire organizational structure around the IT capabilities.
When it comes to security, there are always trade-offs between security and convenience/ease of administration. This article examines some of the main pros and cons of using key authentication vs password authentication for hosting an SFTP server.
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

708 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now