Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Hosts File Manipulation

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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 …
This article will help to fix the below errors for MS Exchange Server 2016 I. Certificate error "name on the security certificate is invalid or does not match the name of the site" II. Out of Office not working III. Make Internal URLs and Externa…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
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…

564 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