Solved

Hosts File Manipulation

Posted on 2009-07-07
5
400 Views
Last Modified: 2012-05-07
I run my companies little Windows 2003 network, nothing too fancy, 2 servers, a cheap dlink router and about 20 XP workstations all on a domain.  I'm also the Manager and recently I've had a problem with my employee's going on facebook constantly so I created forward lookup zones for Myspace and Facebook and pointed them back to 127.0.0.1.  Works great except now I want to get on Facebook every so often.  
I tried a workaround by making an OpenDNS server as a my secondary on my machine and it works every so often.  I'll be on Facebook one minute, leave it open and not look at it, it will download updates and 2 hours later I click on something and it hits the loop back and fails.

I'm not looking to implement anything like ISA server, its been recommended before and I don't have the money or time to learn new software.  I know I could setup a Proxy on my home machine but I was thinking if there was a way to local force specific domain requests to a specific DNS server, possibly in the hosts file?

I'm more interested in seeing if this is possible then actually implementing it so any help would be appreciated.  Thanks in advance.
0
Comment
Question by:WAstarita
5 Comments
 
LVL 1

Expert Comment

by:_Fred
ID: 24794673
Configure your opendns to have all the zones (except the facebook one). point your pc to it self as the primary dns.
Note that the secondary dns will work only when the primary is down, not if the primary cant resolve a query.
Actually i dont know opendns, and i dont know if it is able to work with AD.
But if it doesnt and if you have 2 servers, configure one of them to be unsrestricted (for you to use) and the other with the restriction that you already made (for the other users)
0
 
LVL 2

Author Comment

by:WAstarita
ID: 24794850
The opendns server I use is a free one, I can't manipulate it.  I kept my inhouse dns as the primary because the AD issues.  Thats why I want to resolve this at the machine level.
0
 
LVL 2

Accepted Solution

by:
cincytopher earned 250 total points
ID: 24795011
You cant specify which DNS to use by editing the Hosts file but you can simply add host to ip resolutions to the hosts file.  When your computer wants to resolve a host name, it will check the local hosts file before querying DNS.  So, simply add the following to your hosts file and you should be in business.

69.63.176.140  facebook.com
63.135.80.49    myspace.com
0
 
LVL 9

Assisted Solution

by:djpazza
djpazza earned 250 total points
ID: 24795025
Add facebook to your hosts file, as your hosts file gets checked for name resolution before any dns servers.

facebook.com             69.63.186.12
0
 
LVL 20

Expert Comment

by:Iain MacMillan
ID: 24795099
forget hosts file or you will be constantly updating 20 systems, and the users will get smart, i use OpenDNS to do this very thing, and i set my 2 DC's to only use OpenDNS DNS server IP's for all external requests, and on ODNS i setup an account with 3 external IP's to match my 2 controllers, and the 1 IP that all my users connect out on via the router (your setup is bound to be different, but you need to check what your external IP's are).

from there i used the content filtering service, and manual blocks on some other domains, and I got all my bandwidth back, and productivity improved dramatically - stopped web mail access too for Yahoo/Hotmail etc.

if you need further info let me know -- took me a day to figure the domain controllers were part of the puzzle, as i originally just used the single IP from the router for all user systems.
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Join & Write a Comment

BIND is the most widely used Name Server. A Name Server is the one that translates a site name to it's IP address. There is a new bug in BIND (https://kb.isc.org/article/AA-01272), affecting all versions of BIND 9 from BIND 9.1.0 (inclusive) thro…
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

706 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

18 Experts available now in Live!

Get 1:1 Help Now