Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

how to forever block certain websites

Posted on 2011-09-07
10
Medium Priority
?
1,659 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 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
Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

 
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

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

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

WARNING:   If you follow the instructions here, you will wipe out your VTP and VLAN configurations.  Make sure you have backed up your switch!!! I recently had some issues with a few low-end Cisco routers (RV325) and I opened a case with Cisco TA…
Ever visit a website where you spotted a really cool looking Font, yet couldn't figure out which font family it belonged to, or how to get a copy of it for your own use? This article explains the process of doing exactly that, as well as showing how…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

704 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