Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Hosts File Manipulation

Posted on 2009-07-07
5
Medium Priority
?
413 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 1000 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 1000 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

WatchGuard Case Study: Museum of Flight

“With limited money and limited staffing, we didn’t have a lot of choices in terms of what we could do to bring efficiency. WatchGuard played a central part in changing that.” To provide strong, secure Wi-Fi access within the museum, Hunter chose to deploy WatchGuard’s AP120 APs.

Question has a verified solution.

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

If you have done a reformat of your hard drive and proceeded to do a successful Windows XP installation, you may notice that a choice between two operating systems when you start up the machine. Here is how to get rid of this: Click Start Clic…
When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup" or a blinking cursor with black screen. A loop for Auto repair will start but fix nothing.  You will be panic as there are no back…
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…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

885 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