Solved

Hosts File Manipulation

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

There have been a lot of times when we have seen the need to enter a large number of DNS entries in a forward lookup zone. The standard procedure would be to launch the DNS Manager console, create the Zone and start adding new hosts using the New…
A quick step-by-step overview of installing and configuring Carbonite Server Backup.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

911 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

26 Experts available now in Live!

Get 1:1 Help Now