Solved

Hosts File Manipulation

Posted on 2009-07-07
5
403 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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
repairing Windows XP on a different partition 17 76
Exchange 2010 Autodiscover for iOS devices 4 43
Big Problem with Redirected Folder 8 44
SPF record issue 6 36
On July 14th 2015, Windows Server 2003 will become End of Support, leaving hundreds of thousands of servers around the world that still run this 12 year old operating system vulnerable and potentially out of compliance in many organisations around t…
Resolve DNS query failed errors for Exchange
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

810 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