[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Using hosts file to stop myspace usage

Posted on 2008-11-06
8
Medium Priority
?
331 Views
Last Modified: 2012-05-05
All our users are thin client users.
We do not have any web filtering so I would like to stop them from using myspace by the hosts file
I did a whois for www.myspace.com and it comes up with 63.135.80.46.
So I tried to build the hosts file to say
127.0.0.1          63.135.80.46

I thought by doing this it would send myspace requests to the localhost which is a dead page.
However, it is not working.  What did I do wrong???
0
Comment
Question by:steveLaMi
8 Comments
 
LVL 97

Accepted Solution

by:
Lee W, MVP earned 2000 total points
ID: 22900413
You're mapping an IP to an IP - that won't work - you need to map an IP to a NAME

Try:

127.0.0.1     www.myspace.com

This says when "www.myspace.com" is in need of resolving, resolve it to 127.0.0.1

You might also want to add:
127.0.0.1   myspace.com
0
 
LVL 1

Expert Comment

by:5prock3t
ID: 22900428
I would try:

127.0.0.1      myspace.com

This should redirect all subdomains myspace might have outside of www.myspace.com. I would also put the entry in the lmhosts file as well for good measure.
0
 
LVL 3

Expert Comment

by:overcld9
ID: 22900446
your entry should be

127.0.0.1     localhost
63.135.80.46  http://www.myspace.com

You have to flush the DNS cache before it will use the host file. Open run and type ipconfig /flushdns.

Alternately there is a great free service that can provide content filtering service site wide. The address is
http://opendns.org

Hope this Helps,

Sean
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 97

Expert Comment

by:Lee W, MVP
ID: 22900472
Putting the entry in LMHOSTS is pointless - that for Windows name resolution on the local network.  And overcld9's post is incorrect.  While you SHOULD have an entry for localhost, you would NOT have http:// in it AND, keep in mind - the idea is to BLOCK access to MySpace - a corrected entry (without http://) would actually guarantee access if DNS failed.
0
 
LVL 3

Expert Comment

by:overcld9
ID: 22900482
Sorry I gave you the wrong entry for my space .. you would want to change the ip addess for myspace.com .. I wouldn't use 127.0.0.1 as there are a number of apps that use the localhost designation.

for myspace
127.0.0.1 localhost
199.181.132.250 myspace.com

btw .. 199.181.132.250 is disney.com

0
 
LVL 3

Expert Comment

by:overcld9
ID: 22900493
funny I was fixing the post before I noticed any one else was commenting ...
0
 
LVL 29

Expert Comment

by:Michael Worsham
ID: 22900496
An easy solution would be setting up an open source (aka free) Untangle application server between your router and your internal network in transparent bridge mode. The Untangle appliance has a Web Content Control module that blocks user access to specific Internet websites. The Web Content Control also enables you to choose among these categories to define web content control policies in your workplace. can can use custom URL blocklists for hosts, domains, and file types to block additional content.

Untangle Site:
http://www.untangle.com/

Untangle Product Overview:
http://www.untangle.com/index.php?option=com_content&task=view&id=86&Itemid=179

Untangle Demo/Video Overview
http://www.untangle.com/video_overview/

Untangle Quick Start Guide
http://www.untangle.com/pdf/Download_QuickStart.pdf

Untangle Server as a Bridge
http://wiki.untangle.com/index.php/Introduction#Untangle_Server_as_a_Bridge
0
 
LVL 97

Expert Comment

by:Lee W, MVP
ID: 22900507
Actually, if you're trying to redirect, I to another page, I would suggest creating a web page on your intranet that explains the acceptable use policy for your internet connection... then redirect your users to THAT page.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
While rebooting windows server 2003 server , it's showing "active directory rebuilding indices please wait" at startup. It took a little while for this process to complete and once we logged on not all the services were started so another reboot is …
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?

868 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