Creating a Pinpoint DNS Zone

You want to return different IP addresses for the same hostname from different DNS servers for users that are in different regions. For example, have DNS servers in the ABC return “1.2.3.4” for my.domain.com and DNS servers in XYZ return “5.6.7.8” for same name.

domain.com is an internal Active Directory DNS zone

With pinpoint DNS, you are creating a primary DNS zone in your namespace for the purposes of controlling replication traffic and delivering it to people who are only using that DNS server.

In a nutshell, we are creating a Standard/Primary DNS zone named the same as the hostname you want to answer for (in this case, my.domain.com) with a single host and then choosing which DNS servers will receive a replica of this zone.  The zone will have a single A record for “my.”, which will resolve to 1.2.3.4 for ABC users and 5.6.7.8 for our XYZ users.

Configure First Primary DNS Server

  1. Launch the DNS Management Console and connect to your primary DNS server.
  2. Right-click Forward Lookup Zones and select New Zone.
  3. On the New Zone Wizard page, click Next.
  4. Ensure that the radio button Primary Zone is selected (it is selected default).
  5. If the DNS server is also a Domain Controller, the Store the zone in Active Directory checkbox will be selected by default. CLEAR IT and click Next.
  6. In the Zone name text box, enter the FQDN of the new zone (in our example, my.domain.com, and click Next).
  7. The radio button Create a new file with this file name is selected by default. Click Next.
  8. The radio button Do not allow dynamic updates is selected by default. Click Next.
  9. Click Finish.
  10. Expand Forward Lookup Zones and select your newly created zone (my.domain.com is what we are configuring).
  11. Right-click on the new zone (my.domain.com) and select Properties.
  12. Select the Zone Transfers tab.
  13. The Allow zone transfers checkbox is selected by default. Select the Only to the following servers radio button.
  14. Click Edit.
  15. In the Allow Zone Transfers dialog box, click the blank line that says <Click here to add an IP Address or DNS name> and enter the addresses (one per line) for the additional DNS servers you want to host this zone.
  16. Click OK when done to close the Allow Zone Transfers dialog box.
  17. Click OK to close the DNS zone properties dialog box.
  18. Right-click on the new zone (my.domain.com) and select New  Host (A or AAAA)…
  19. In the New Host dialog box, leave the Name field blank (the record will be created with an “my.”, meaning it answers for the name of the zone that it’s in).
  20. In the New Host dialog box, enter the IP address for this host (1.2.3.4, in our example) and click the Add Host button.

Configure First Secondary DNS Server

  1. Launch the DNS Management Console and connect to your secondary DNS server.
  2. Right-click Forward Lookup Zones and select New Zone.
  3. On the New Zone Wizard page, click Next.
  4. Select the radio button for Secondary Zone and click Next.
  5. In the Zone name text fox, enter the FQDN of the zone you created in step 6 above and click Next.
  6. On the Master DNS Servers page, enter the IP address of the Primary DNS Server (the server used in Step 1 under “Configure Primary DNS Server”) and press Enter.
  7. Click Next.
  8. Click Finish.
  9. Repeat for each additional secondary DNS server to configure.

Configure Second Primary DNS Server

  1. Follow steps 1-19 outlined for the first Primary DNS server.
  2. Replace the IP address in step 20 with the IP address of the second host you want to use (in our example, 5.6.7.8).

Configure Second Secondary DNS Server

  1. Follow steps 1-5 outlined for the first Secondary DNS server.
  2. Replace the IP address in step 6  with the IP address used for the second Primary DNS server.
  3. Complete steps 7-9.

Remove a Name Server from All Reverse Zones

##############################

# The following section contains all input parameters

$DC = “DC1.contoso.internal” # Domain controller to be used

$nameserver = “DNS.contoso.internal” # Nameserver to remove

#

##############################

$list = Get-DnsServer -ComputerName $DC | select -Property serverzone -ExpandProperty serverzone | where  {$_.isdsintegrated -eq “true” -and $_.isreverselookupzone -eq “true”} | select -Property zonename

foreach ($zone in $list ) {Remove-DnsServerResourceRecord -ComputerName $DC -ZoneName $zone.zonename -RRType Ns -Name “@” -RecordData $nameserver -Force}

Get all DNS Zones and Records in CSV

$results = Get-DnsServerZone | % {

    $zone = $_.zonename

    Get-DnsServerResourceRecord $zone | select @{n=’ZoneName’;e={$zone}}, HostName, RecordType, @{n=’RecordData’;e={if ($_.RecordData.IPv4Address.IPAddressToString) {$_.RecordData.IPv4Address.IPAddressToString} else {$_.RecordData.NameServer.ToUpper()}}}

}

$results | Export-Csv -NoTypeInformation c:\temp\DNSRecords.csv -Append

Exit mobile version
%%footer%%