If you have deployed NS1 edge services (e.g., DNS and DHCP) in your network, you can configure dynamic DNS (DDNS) updates to achieve one of the following outcomes:
If you allow NS1 to send dynamic updates to Active Directory DNS servers (option A), then the NS1 DHCP server will create resource records on behalf of a DHCP client whenever a lease is assigned. It will remove these records when the lease expires or is released.
If you are configuring the system for AD clients to send dynamic updates to NS1 DNS servers (option B), note that the NS1 DNS server can accept dynamic updates from any client sending unsigned or GSS-TSIG signed updates.
Before you begin, note the following:
-
You must have NS1 DNS and DHCP edge services deployed in your network.
-
You must have at least one DHCP service with DDNS enabled.
-
The Microsoft AD server must have the DNS role configured.
-
Optionally, an AD user with a service principal name assigned and the corresponding keytab file created and exported.
This is required if using GSS-TSIG. In order to send GSS-TSIG signed DDNS updates to a Microsoft DNS server, you must create an Active Directory user account dedicated to authentication.
-
Log into the Windows Domain Controller for your Active Directory domain to which your Microsoft DNS server is joined.
-
Click the Windows Start button, and navigate to Windows Administrative Tools > Active Directory Users & Computers.
-
Right-click your domain in the list, and select New > User.
-
Enter the following information ("*" indicates a required field): First name, Last name, Full name*, User logon name*
Note
The user logon name is used again for generating the keytab file, NS1 recommends creating a login name that clearly indicates the purpose of the user account to be used for DDNS updates by the NS1 DHCP server (ex. ns1-ddns-svc).
-
Click Next.
-
Enter a password twice, and then select the following options:
-
Deselect (disable) the “User must change password at next logon” option.
-
Select (enable) “User cannot change password.”
-
Select (enable) “Password never expires."
-
-
Click Next to view a summary.
-
Click Finish. This creates a new user account.
Warning
This step is required if using GSS-TSIG signed DDNS updates to or from a Microsoft DNS server. If you are using an insecure connection type, you do not need to create a service account or keytab file. Skip ahead to step 4. The NS1 DHCP server will first try an insecure update first, followed by a secure update if the AD DNS server is configured for "nonsecure and secure" or "secure" updates.
If you plan to send GSS-TSIG signed DDNS updates to or froma Microsoft DNS server, you must create a keytab file on the Microsoft AD Domain Controller. A keytab is a file containing pairs of Kerberos principals and encrypted keys (which are derived from the Kerberos password). You can use a keytab file to authenticate to various remote systems using Kerberos without entering a password. This is required for performing secure, authenticated DDNS updates.
-
Click the Windows Start button, and navigate to Windows System > Command Prompt.
-
Run the command below to use
ktpass
to assign a Kerberos service principal name to the user account you created in step 1, and to generate a keytab file containing this information.ktpass -princ DNS/<dns_server_fqdn>@<AD DOMAIN NAME> -mapuser<USERNAME>@<AD_DOMAIN_NAME> -ptype KRB5_NT_PRINCIPAL -crypto AES256-SHA1 -pass <PASSWORD> -mapOp set -out ns1dns.keytab
-
<dns_server_fqdn>
is the fully-qualified domain name (FQDN) of the NS1 DNS server to receive the updates. Note that this value must be in all lowercase letters. -
<AD_DOMAIN_NAME>
is the domain name mapping to the AD service account created in step 1. Note that this value must be in all uppercase letters. -
<USERNAME>
is the username of the service account created in the previous step. -
<PASSWORD>
is the password of the service account created in the previous step.
Example 1. Generating a keytab file
The example below assumes the username to be
ns1-ddns-svc
, an AD domain ofexample.com
, the NS1 DNS server FQDN to bens1dns1.mydomain.test
, a password set toMyPas$w0rd
, and the desired output filename to bens1dns.keytab
.ktpass -princ DNS/ns1dns1.mydomain.test@EXAMPLE.COM -mapuser ns1-ddns-svc@EXAMPLE.COM -pass MyPas$w0rd -ptype KRB5_NT_PRINCIPAL -crypto AES256-SHA1 -mapOp set -out ns1dns.keytab
-
Warning
This step is required if using GSS-TSIG signed DDNS updates to or from a Microsoft DNS server.
-
Log into the NS1 portal and navigate to the Security tab.
-
On the Service Principals page, click the add (+) icon to add a new service principal ID.
-
Under Upload Keytab File, click Keytab and locate the file you created in the previous step. Then, click Open.
-
Click Upload. The service principal(s) contained in the keytab file appear in the list. Note the Principal Details sidebar containing details about the keytab file as configured in step 2.
In this step, you will create a pointer (remote connection) to the remote Windows server.
-
Log into the NS1 portal and navigate to DHCP > Remote Servers.
-
Click the add (+) icon to create a remote, authoritative DNS server.
-
Enter the DNS server FQDN or IP address and (optionally) the DNS server port. Note the default port is 53.
-
Select the connection type:
-
Only nonsecure - (Not recommended) Relies on the IP address of the updating server only.
-
Nonsecure followed by secure - (Default method for most Microsoft clients) First, an insecure update method is attempted. If refused, a secure update using GSS-TSIG is attempted. This allows the Micorosft server to determine if insecure or GSS-TSIG secured should be used. If selected, you must also select a service principal from the list, enter a KDC server IP or FQDN, and (optionally) enter a KDC server port. Likely, this is the same server used to generate the keytab file.
-
Only secure - Note that if you select this option, you must also select a service principal from the list, enter a KDC server IP or FQDN, and (optionally) enter a KDC server port. Likely, this is the same server used to generate the keytab file.
-
-
Click Save remote server.
In this step, you will create forward and reverse remote zones, and connect it to a scope group and service principal.
-
In the NS1 portal, navigate to DHCP > Remote Zones.
-
Click the add (+) icon to create a new remote zone.
-
Enter the fully-qualified domain name (FQDN) of the remote zone.
-
Select one of the following Zone update methods:
-
Nonsecure (Not recommended)
-
Nonsecure followed by secure (GSS-TSIG)
-
Secure (GSS-TSIG)
Warning
Do not select the Secure (TSIG) method as this is not supported by Microsoft AD.
-
-
Based on the update method you select, a list of remote servers with matching update methods appears in the drop-down menu. Select the remote server you created in the previous step.
-
Click Next.
-
Select an existing DHCP scope group. Refer to Managing scope groups for details.
-
Then click Save Remote Zone. The new zone appears in the list.
Note
You can select a remote zone from the list to view details in the sidebar on the right.
-
Repeat this process to create the corresponding reverse remote zone.
In the last step, you must configure the DHCP scope group to allow for NS1 DDNS updates to the Microsoft server.
-
In the NS1 portal, navigate to DHCP > Management to view a list of DHCP scope groups.
-
Next to the scope group you associated with the remote zone in the previous step, select the menu icon
and select Edit DDNS settings.
-
Under Edit DDNS Settings, select Microsoft Active Directory DDNS.
-
Under Choose a remote zone, start typing the names of the forward zone you created in step 5 and select it from the list. In the same field, enter the reverse zone you created in step 5 and select it from the list. Both the forward and reverse zones should appear under "Connected Remote Servers."
-
Optionally, enter a default suffix. This is the suffix we append to create an FQDN from the hostname if it is not included in the client request.
-
Optionally, enter a prefix. If NS1 is set to generate an FQDN for the client, the prefix is prepended to the FQDN.
-
Click Save Microsoft Active Directory DDNS settings.
Now, once a DHCP client receives an IP address from NS1, NS1 communicates with Kerberos for authentication and authorization to update the remote Microsoft server and create a DDNS entry.
This is required if using GSS-TSIG. In order to send GSS-TSIG signed DDNS updates to a Microsoft DNS server, you must create an Active Directory user account dedicated to authentication.
-
Log into the Windows Domain Controller for your Active Directory domain to which your Microsoft DNS server is joined.
-
Click the Windows Start button, and navigate to Windows Administrative Tools > Active Directory Users & Computers.
-
Right-click your domain in the list, and select New > User.
-
Enter the following information ("*" indicates a required field): First name, Last name, Full name*, User logon name*
Note
The user logon name is used again for generating the keytab file, NS1 recommends creating a login name that clearly indicates the purpose of the user account to be used for DDNS updates by the NS1 DHCP server (ex. ns1-ddns-svc).
-
Click Next.
-
Enter a password twice, and then select the following options:
-
Deselect (disable) the “User must change password at next logon” option.
-
Select (enable) “User cannot change password.”
-
Select (enable) “Password never expires."
-
-
Click Next to view a summary.
-
Click Finish. This creates a new user account.
Warning
This step is required if using GSS-TSIG signed DDNS updates to or from a Microsoft DNS server. If you are using an insecure connection type, you do not need to create a service account or keytab file. Skip ahead to step 4. The NS1 DHCP server will first try an insecure update first, followed by a secure update if the AD DNS server is configured for "nonsecure and secure" or "secure" updates.
If you plan to send GSS-TSIG signed DDNS updates to or froma Microsoft DNS server, you must create a keytab file on the Microsoft AD Domain Controller. A keytab is a file containing pairs of Kerberos principals and encrypted keys (which are derived from the Kerberos password). You can use a keytab file to authenticate to various remote systems using Kerberos without entering a password. This is required for performing secure, authenticated DDNS updates.
-
Click the Windows Start button, and navigate to Windows System > Command Prompt.
-
Run the command below to use
ktpass
to assign a Kerberos service principal name to the user account you created in step 1, and to generate a keytab file containing this information.ktpass -princ DNS/<dns_server_fqdn>@<AD DOMAIN NAME> -mapuser<USERNAME>@<AD_DOMAIN_NAME> -ptype KRB5_NT_PRINCIPAL -crypto AES256-SHA1 -pass <PASSWORD> -mapOp set -out ns1dns.keytab
-
<dns_server_fqdn>
is the fully-qualified domain name (FQDN) of the NS1 DNS server to receive the updates. Note that this value must be in all lowercase letters. -
<AD_DOMAIN_NAME>
is the domain name mapping to the AD service account created in step 1. Note that this value must be in all uppercase letters. -
<USERNAME>
is the username of the service account created in the previous step. -
<PASSWORD>
is the password of the service account created in the previous step.
Example 2. Generating a keytab file
The example below assumes the username to be
ns1-ddns-svc
, an AD domain ofexample.com
, the NS1 DNS server FQDN to bens1dns1.mydomain.test
, a password set toMyPas$w0rd
, and the desired output filename to bens1dns.keytab
.ktpass -princ DNS/ns1dns1.mydomain.test@EXAMPLE.COM -mapuser ns1-ddns-svc@EXAMPLE.COM -pass MyPas$w0rd -ptype KRB5_NT_PRINCIPAL -crypto AES256-SHA1 -mapOp set -out ns1dns.keytab
-
Warning
This step is required if using GSS-TSIG signed DDNS updates to or from a Microsoft DNS server.
-
Log into the NS1 portal and navigate to the Security tab.
-
On the Service Principals page, click the add (+) icon to add a new service principal ID.
-
Under Upload Keytab File, click Keytab and locate the file you created in the previous step. Then, click Open.
-
Click Upload. The service principal(s) contained in the keytab file appear in the list. Note the Principal Details sidebar containing details about the keytab file as configured in step 2.
-
In the NS1 portal, navigate to DNS > Networks. Select the relevant Cloud-Managed DDI (or other DDI edge) network from the list to view its details on the right.
-
Click the Service Princpals tab on the right sidebar and click Add principal.
-
Begin typing the name of the service principal created in the previous step, and select the principal(s) uploaded with the keytab file.
-
Click the X in the upper-right corner to exit the modal.
-
Run the command below from the Active Directory Domain Controller to export the zone file. By default, this file is stored in
%systemroot%/System32/Dns
directory.dnscmd [<servername>] /zoneexport <zonename> <zoneexportfile>
For example, with a server and realm of
ddi.test
:dnscmd ddi.test /zoneexport ddi.test ddi-test.txt
-
Modify the zone file:
-
At the top of the zone file, add
$TTL <number>
to indicate the zone's time-to-live (TTL) value. This is required for import into the NS1 platform. For more information, refer to Best Practices: TTL configuration. -
Modify the existing A records to point to the NS1 DNS server (as opposed to the AD domain controller), except for the domain controller A record which is required for Kerberos authentication.
-
-
In the NS1 portal, navigate to DNS > Zones, and then click Add Zone.
-
Enter the Domain name. This is the fully qualified domain name (FQDN) matching the zone name exported from Active Directory.
-
Optionally, you can attach the zone to one or more DNS views if you created these already — otherwise, leave this blank as you will be instructed to create a new DNS view for this particular integration in step 9.
-
Optionally, click Override zone name and enter a unique Zone name. The zone name is a nominal identifier for this zone that will be used later when configuring the access control list (ACL). If you do not enter a zone name, one will be automatically generated.
-
Select the DNS network(s) on which to publish the zone. The network you select should match the network on which you applied the service principal. Likely, this is the Cloud-Managed DDI or another NS1 edge network.
-
Under Zone Settings, select Zone file import. Click Browse files and select the Active Directory zone file you exported and edited.
-
Click Save zone. The new zone (and the number of associated records that were also imported) appears in the list.
After importing the AD zone into the NS1 platform, execute the command below to update the MNAME via API.
curl -skX PUT https://api.nsone.net/v1/zones/$AD_DOMAIN_NAME -H "X-NSONE-KEY: $NSONE_API_KEY" -d "{\"zone\": \"$AD_DOMAIN_NAME\", \"primary_master\": \"$SUBDOMAIN.$AD_DOMAIN_NAME\"}"
where
-
$AD_DOMAIN_NAME
is the zone's FQDN as specified in the keytab file (e.g., addev.ns1.com). -
$SUBDOMAIN
is the subdomain specified in the keytab file (e.g., ns1dns)
-
In the NS1 portal, navigate to DNS > Zones. Click the name of the AD zone you imported in step 5 to view details.
-
Click + Add record.
-
Under Record Type, ensure type "A" is selected from the list.
-
In the name field, enter the name of the NS1 DNS server (i.e.,
$SUBDOMAIN.$AD_DOMAIN_NAME
). -
Enter a TTL value (in seconds). The default TTL is 3600 seconds (1 hour). For more information, refer to Best Practices: TTL Configuration.
-
Under Answers, enter the IP address of the NS1 DNS server, and then click Add Answer to save it.
-
Click Save record.
An access control list (ACL) is a named object associated with one or more IP addresses, TSIG keys, or GSS-TSIG identities (service principals). For the purpose of AD configuration, you will add an IP address and GSS-TSIG identity to the ACL.
-
In the NS1 portal, navigate to DNS > ACLs, and then click the + sign to create a new ACL.
-
Enter a name for the access control list (e.g., ddnsupdate).
-
Next to Add items, select one (or more) of the following options to specify the clients and/or identities who will have access to zone imported from AD:
-
IP address - Select this option if configuring nonsecure updates. Enter a client IPv4 address, subnet, or range.
-
GSS-TSIG identity - Select this option if configuring secure updates from the AD server (ie., if you generated and uploaded a keytab file). Enter the Kerberos Principals Name. This is a service principal that will be able to provide dynamic updates to the NS1 DNS server. For nonsecure updates, enter “*” as the GSS-TSIG identity. For secure updates, enter an exact match identity or a wildcard identity, for example, “*@DDI.TEST” or “CLIENT$@DDI.TEST” where “CLIENT” is the name of a client machine.
Note
You can specify multiple IP addresses, TSIG keys, and/or GSS-TSIG identities within the same ACL. The list of objects (i.e., addresses, keys, identities) you specify are processed from top to bottom where objects of the same type are processed using logical "or" statements and objects of different types are processed as logical "and" statements. You can rearrange the order of objects within an ACL to adjust the processing order and logic.
-
-
Click Save ACL.
In this step, you will attach the access control list (ACL) you just created to a new DNS view. Note that you can attach multiple ACLs to a single DNS view. In doing so, you must ensure the ACLs are organized in the proper "rule order."
-
In the portal, navigate to DNS > Views.
-
Click the plus sign (+) to create a new DNS view.
-
Enter a name for the DNS view.
-
Optionally, enter the DNS network(s) on which you want to publish the DNS view. You can leave this field blank if you are not ready to publish the view.
-
Next to ACLs, click the Update tab and begin typing the name of the ACL you created in the previous step. In doing so, you are giving the clients and/or identities listed in that ACL "write" access to the zones associated with this view.
Note
Granting someone “update” access does not automatically grant them “read” access.
-
Next to ACLS, click the Read tab and re-enter name of the ACL you created earlier.
Note
If granting multiple ACLs “read” access, take note of the order in which they appear under ACL Rule Order. Queries are processed from top to bottom using logical “and” statements. To re-order the ACLs, click the icon to the left of an ACL and then drag-and-drop.
-
Under Zones, begin typing the name of the zone imported from AD in step 5.
-
Click Save view.