Server 2012 : Setup DNS, Reverse Lookup Zone and nslookup

So, we already enabled Scavenging and Aging on our server, and now we want to setup a Reverse Lookup Zone.

Before proceeding, make sure your DNS settings are poitning the right way and you have set IPv6 to DHCP instead of loopback (::1) unless you actually have configured IPv6.

Configure DNS using PowerShell, and why – 2 examples:

The second line in each script requires a tad of explanation. In order to set IPv6 to use DHCP instead of pointing to local loopback (::1), we have to use the -ResetServerAddress.
And why is that you might ask. Well, your dns resolving doesn’t return true unless we do this as it ‘catches’ the IPv6 before it gets to IPv4, so unless you specify your IPv6 you need to set this to DHCP.

  1. Configure 1 DNS server
    $ipv4dns1 = "192.168.90.105";
    Get-DnsClientServerAddress -InterfaceAlias Ethernet | Set-DnsClientServerAddress -ResetServerAddresses
    Set-DNSClientServerAddress -InterfaceAlias Ethernet -ServerAddresses $ipv4dns1
    06-dns 
  2. Configure 2 DNS servers
    $ipv4dns1 = "192.168.90.105";
    $ipv4dns2 = "192.168.90.110";
    Get-DnsClientServerAddress -InterfaceAlias Ethernet | Set-DnsClientServerAddress -ResetServerAddresses
    Set-DNSClientServerAddress -InterfaceAlias Ethernet -ServerAddresses ("$ipv4dns1","$ipv4dns2") 07-dns
  3. Here you can see the difference between having IPv6 set to DHCP (first one) and Loopback (second one).
    Default Server is listed as UnKnown in both instances, but that will be fixed once we have created our Reverse Lookup Zone.
    Note: The examples are from two different IPs
    dns-ipv6loopbackdiff

Create Reverse Lookup Zone

  1. Open your DNS Manager and right-click on New Zone…
    08-dns
  2. Next -> select Primary Zone and we do want to Store the zone in Active Directory. Next >
    09-dns
  3. Here we set the Replication Scope. First one is for the all domain in entire forest if we have such a one. Second is only this domain and third one is for legacy support.
    We choose nr. 2 To all DNS servers running on domain controllers in this domain which is also the default selection.
    10-dns
  4. Select IPv4 Reverse Lookup Zone and click Next >
  5. Here we type in the Network ID or name.
    What this Means is you type the Network part of the IP address. This is basically, in most cases, the 3 first octets of the address.
    You can see how it fills in the IP in reverse order in the greyed out space below (the Zone Name part).
    Click Next >
    11-dns
  6. Select a setting for Dynamic Update and click Next >
    12-dns
  7. Review settings and click Finish
    13-dns

Reviewing your Reverse Lookup Zone

  • You can see your new Zone and a bit of info like Name, Type, Status and wheter it is signed or not. We will sign it in a different post.14-dns
  •  When opening the zone, we can see how it already has populated it with SOA and NS
    15-dns
  • We can now do a successfull nslookup as well
    If it doesn’t Work at first, try restarting the DNS Server service:
    Restart-Service DNS
    16-dns
Posted in DNS, Server 2012, Uncategorized

Leave a Reply