1

I'm running a Windows Server 2003 as a DNS server. I'd like to set up a DNS zone so that the given answer is different depending of the requester's IP address. Let's say I have the zone example.com. If a request for www.example.com comes from the IP address 192.168.1.1, answer will be 192.168.1.254 but if the request comes from 192.168.2.1 answer should then be 192.168.2.254.

The idea is to have some servers sitting on both networks while doing an infrastructure migration.

Cheers.

Spack
  • 1,594
  • 13
  • 22

4 Answers4

3

You are looking for Split-Horizon DNS, also often called "DNS Views" (after the view clause in BIND configuration files).

BIND and other common Unix name servers support this, but as far as I'm aware there's no equivalent functionality for Windows/AD DNS.

There is something that MIGHT work though - netmask ordering of round-robin records. This is decidedly nasty and disgusting, and I would advise against it. (This guy's blog post has more detail and is where I discovered this little bit of nasty).

You can also probably hack something together using two DNS servers, a virtual IP, and a carefully crafted routing/firewall ruleset to direct clients appropriately -- I am not sure if this is more or less disgusting than the netmask ordering thing though.

voretaq7
  • 79,345
  • 17
  • 128
  • 213
  • Indeed I was missing the key word "Split-Horizon". I'll take a look at the netmask ordering technique and see if I can apply for a temporary solution. – Spack Apr 16 '13 at 22:32
1

I don't believe you can do split DNS with a single 2003 instance. If you have one instance on each network segment, you can set the inside to answer the zone and to forward all other queries to the new DNS server.

The Microsoft DNS server allows you to bind it to a specific interface, but not to run two different services with split data. Since you can unbind it from an interface, there may be a way to run ISC Bind on that other interface. This would have you running Microsoft DNS service on one interface and BIND on another, or potentially bind on both.

The easiest ( if klunky ) way to do it within the Micosoft ecosystem would be to run the 2003's in Hyper-Vs as virtuals each with it's own DNS server and data. They could still be in the same domain if you create the DNS zones as not active directory integrated. Server 2008r2 would let you run as an evaluation and give you time to migrate. Server 2012 activates immediately. Be sure to check out the licensing on Server 2012 in Hyper-V. You can run several instances on Standard and 'unlimited' on the Datacenter license.

0

It's not possible to do this with one server.

My recommendation: set up one server in each subnet with the same zones, different IP addresses. Configure it so that they only listen on an internal interface to that subnet.

Configure the DHCP ranges so that only the local dns server is listed for the subnet scope.

This could get also get fairly nasty if you're using active directory as the zones are replicated between DCs

Snowburnt
  • 775
  • 2
  • 5
  • 18
0

I'm pretty sure that round robin and netmask ordering accomplishes this for you. Both are enabled by default in Windows Server 2003 DNS.

joeqwerty
  • 108,377
  • 6
  • 80
  • 171