I have a Windows Server 2008 server set up at my school and would like to set the DNS servers for the clients based on their IP address.
Reason:
We have faculty machines and a student lab and would like to use OpenDNS on the student machines but no on the faculty machines.
What is the best way to do this?
Thanks!
Sounds like the systems are in different subnets (otherwise, there'd be no way to tell them apart by IP address), correct?
If this is the case, modify your DHCP scope options for the different scopes to feed the student machines the OpenDNS configuration and the faculty machines the normal configuration.
If these computers are in an active directory domain, they must point at the active directory DNS servers for client resolution. But on your DNS server you can setup forwarders so that requests for non-local records will be forwarded to an external DNS server.
AFAIK, there is no way to setup forwarders to select different servers based on the source IP, so you would need to have to setup an additional DNS server with your AD zones. Set the forwarders to OpenDNS on that server and point your clients at that.
As @joeqwerty mentioned an HTTP proxy would also be useful here. When the browser is configured to use the proxy (non-transparent) then the DNS requests will be resolved by the proxy server. So you could easily use a GPO, or WPAD to push a proxy setting, setup a basic proxy, and set your preferred DNS on the proxy server.