Dynamic DNS Update in Windows and Window·续

| Domain Name | Specifies the FQDN of the client. |

The conditions under which DHCP clients send the FQDN option depend on the operating system that the client is running and how the client is configured. The actions taken by DHCP servers also depend on the operating system that the server is running and how the server is configured.

By default, the Windows DHCP Client service uses the following process.

  1. The Windows DHCP Client service sends the FQDN option with the Flags field set to 0. This flag requests that the client update the A resource record, and the DHCP Server service updates the PTR resource record.

  2. The client waits for a response from the DHCP server. Unless the DHCP server sets the Flags field to 3, the DNS client then initiates an update for the A resource record.

  3. If the DHCP server doesn't support or isn't configured for the registration of the DNS record, an FQDN isn't included in the response. In this case, the DNS client attempts to register the A and PTR resource records.

Depending on what the DHCP client requests, the DHCP server can take different actions.

If the DHCP client sends a DHCPREQUEST message without the FQDN option, the behavior depends on the type of DHCP server and its configuration. The DHCP server updates both records if you configure it to update records on behalf of DHCP clients that don't support the FQDN option.

In the following cases, the DHCP server doesn't perform any action:

  • The DHCP server doesn't support dynamic update.

  • The DHCP server is configured not to do dynamic updates for clients that don't support the FQDN option.

  • The DHCP server is configured not to register DNS resource records.

If the Windows DHCP client requests that the server updates the PTR resource record but not the A resource record, the behavior depends on the type of DHCP server and its configuration.

The server can perform any of the following actions:

  • If the Windows DHCP server is configured not to perform dynamic updates, it doesn't include the FQDN option in its response. It also doesn't update either resource record. In this case, the DNS client attempts to update both the A and PTR resource records if it's capable.

  • If the Windows DHCP server is configured to update according to the request of the DHCP client, the server attempts to update the PTR resource record. The DHCP server sends a DHCPACK message to the DHCP client. This message contains the FQDN option with the Flags field set to 0. The DHCPACK message confirms that the DHCP server updates the PTR record. The DNS client then attempts to update the A resource record, if it's capable.

  • If the DHCP server is configured to always update A and PTR both records, the DHCP server attempts to update both resource records. The DHCP server DHCPACK message to the DHCP client contains the FQDN option with the Flags field set to 3, notifying the DHCP client that the DHCP server updates A and PTR records. In this case, the DNS client doesn't attempt to update either resource record.

Statically configured and remote access clients process

Statically configured clients and remote access clients don't rely on the DHCP server for DNS registration. Statically configured clients dynamically update their A and PTR resource records every time they start. Clients also update every 24 hours to refresh records in the DNS database.

Remote access clients can dynamically update A and PTR resource records when a dial-up connection is made. They can also attempt to withdraw, or deregister, the A and PTR resource records when the user closes down the connection explicitly. Computers running Windows Server with a remote access network connection attempt to dynamically register the A and PTR records for the IP address of this connection. By default, the DNS Client service on Windows client doesn't attempt dynamic update over a remote access or VPN connection. To modify this configuration, you can modify the advanced TCP/IP settings of the particular network connection or modify the registry.

In all operating systems, if a remote access client doesn't receive a successful response from the attempt to deregister a DNS resource record, or fails for any other reason to deregister a resource record within four seconds, the DNS client closes the connection. In such cases, the DNS database might contain a stale record.

If the remote access client fails to deregister a DNS resource record, it adds a message to the event log, which you can view by using Event Viewer. The remote access client never deletes stale records, but the remote access server attempts to deregister the PTR resource record when the client is disconnected.

By default, the Windows DNS Client service doesn't attempt to update A and PTR records automatically for dial-up connections.

Multihomed client process

If a dynamic update client is multihomed, meaning the client has more than one network connection and associated IP address, it registers all IP addresses for each network connection. If you don't want it to register these IP addresses, you can configure the network connection to not register IP addresses.

The dynamic update client doesn't register all IP addresses with the DNS servers in all namespaces that the computer is connected to. For example, a multihomed computer, client1.example.contoso.com, is connected to both the Internet and the corporate intranet. The client is connected to the intranet by adapter A, a DHCP adapter with the IP address 172.16.8.7. The client is also connected to the Internet by adapter B, a remote access adapter with the IP address 10.3.3.9. The client resolves intranet names by using a name server on the intranet, and resolves Internet names by using a name server on the Internet.

Secure dynamic update

DNS update security is available only for zones that are integrated into Active Directory. When you integrate a zone into Active Directory, access control lists (ACL) are available in the DNS console for you to add or remove users and groups from the ACL for a specified zone or resource record. ACLs are for DNS administration access control only, and don't influence DNS query resolution.

By default, dynamic update security for DNS servers and clients are handled as follows:

  • DNS clients attempt to use unsecured dynamic update first. If an unsecured update is refused, clients try to use secure update.

The default update policy permits clients to attempt to overwrite a previously registered resource record, unless blocked.

  • After a zone becomes Active Directory–integrated, DNS servers running Windows Server default to allowing only secure dynamic updates.

When you use file-based zone storage, the default for the DNS Server service is to not allow dynamic updates on its zones. For zones that are either directory-integrated or use standard file-based storage, you can change the zone to allow all dynamic updates. This setting permits all updates to be accepted.

Dynamic update is an addition to the DNS standard specification, defined in RFC 2136.

The dynamic registration of DNS resource records can be restricted with the use of registry entries.

How secure dynamic update works

The secure dynamic update process is described as follows:

  1. To initiate a secure dynamic update, the DNS client first initiates the security context negotiation process, during which the tokens are passed between client and server using TKEY resource records. At the end of the negotiation process, the security context is established.

  2. The DNS client sends the dynamic update request to the DNS server. This request contains resource records for adding, deleting, or modifying data.

  3. The request is signed using the previously established security context.

  4. The signature is passed in the TSIG resource record, which is included in the dynamic update packet.

  5. The server attempts to update Active Directory using the client’s credentials and sends the result of the update to the client. These results are also signed using the security context and the signature passed in the TSIG resource record included in the response.

Secure dynamic update process

The secure dynamic update process is described as follows:

  1. The DNS client queries the preferred DNS server to determine which DNS server is authoritative for the domain name it's attempting to update. The preferred DNS server responds with the name of the zone and the primary DNS server that is authoritative for the zone.

  2. The DNS client attempts a standard dynamic update, and if the zone is configured to allow only secure dynamic updates (the default configuration for Active Directory-integrated zones), the DNS server refuses the nonsecure update. If the zone is configured for standard dynamic update rather than secure dynamic update, the DNS server accepts the DNS client’s attempt to add, delete, or modify resource records in that zone.

  3. The DNS client and DNS server begin TKEY negotiation.

  4. The DNS client, and DNS server negotiate an underlying security mechanism. Windows dynamic update clients and DNS servers can only use the Kerberos protocol.

  5. Using the security mechanism, the DNS client, and DNS server verify their respective identities and establish the security context.

  6. The DNS client sends the dynamic update request to the DNS server, signed using the established security context. The signature is included in the signature field of the TSIG resource record that is included in the dynamic update request packet. The DNS server verifies the origin of the dynamic update packet by using the security context and the TSIG signature.

  7. The DNS server attempts to add, delete, or modify resource records in Active Directory. The update depends on whether the DNS client has the proper permissions and if the prerequisites are satisfied.

  8. The DNS server sends a reply to the DNS client stating whether it was able to make the update, signed using the established security context. The signature is included in the signature field of the TSIG resource record that is included in the dynamic update response packet. If the DNS client receives a spoofed reply, it ignores it and waits for a signed response.

Security for DHCP clients that don't support the FQDN option

Windows DHCP clients that don't support the FQDN option (option 81) aren't capable of dynamic updates. If you want the A and PTR resource records for these clients dynamically registered in DNS, you must configure the DHCP server to perform dynamic updates on their behalf.

Having the DHCP server perform secure dynamic updates on behalf of DHCP clients that don't support the FQDN option requires extra configuration to avoid a permission issue. When a DHCP server performs a secure dynamic update on a name, it becomes the owner of that name. Only that DHCP server can update any record for that name.

For example, suppose that the DHCP server DHCP1 created an object for the name host1.example.com and then stopped responding, and that later the backup DHCP server, DHCP2, tried to update a record for the same name, host1.example.com. In this situation, DHCP2 isn't able to update the name because it doesn't own the name.

To avoid this issue, use the built-in security group called DnsUpdateProxy. If you add all DHCP servers as members of the DnsUpdateProxy group, another server can update one server’s records if the first server fails. Also, because all objects created by the members of the DnsUpdateProxy group aren't secured, the first user to modify the set of records associated with a DNS name becomes its owner. When legacy clients are upgraded, they can take ownership of their name records at the DNS server. If every DHCP server registering resource records for older clients are a member of the DnsUpdateProxy group, the problems discussed earlier don't occur.

Securing records using the DnsUpdateProxy group

When the DHCP server is a member of the DnsUpdateProxy group, it doesn't secure the DNS domain names it registers. As a result, don't use this group in an Active Directory integrated-zone that allows only secure dynamic updates without taking more steps to allow records created by members of the group to be secured.

To protect against unsecured records or to allow members of the DnsUpdateProxy group to register records in zones that allow only secured dynamic updates, create a dedicated user account. Using the credentials of this user account, configure DHCP servers to perform DNS dynamic updates. Multiple DHCP servers can use the credentials of one dedicated user account.

The dedicated user account is a standard user account used only to supply DHCP servers with credentials for DNS dynamic update registration. Each DHCP server supplies these credentials when registering names on behalf of DHCP clients using DNS dynamic update. The dedicated user account is created in the same forest where the primary DNS server for the zone to be updated resides. The dedicated user account can also be located in another forest as long as the forest it resides in has a forest trust established with the forest containing the primary DNS server for the zone to be updated.

When installed on a domain controller, the DHCP Server service inherits the security permissions of the domain controller. Meaning it has the authority to update or delete any DNS record that is registered in a secure Active Directory-integrated zone. Other computers running Windows Server, such as domain controllers, securely register these records. When installed on a domain controller, configure the DHCP server with the credentials of the dedicated user account to prevent the server from inheriting, and possibly misusing, the privileges of the domain controller.

Configure a dedicated user account and configure the DHCP Server service with the account credentials under the following circumstances:

  • A domain controller is configured to function as a DHCP server.

  • The DHCP server is configured to perform DNS dynamic updates on behalf of DHCP clients.

  • The DHCP server updates DNS zones that are configured to allow only secure dynamic updates.

After you create a dedicated user account, you can configure DHCP servers with the user account credentials by using the DHCP console or by using the command netsh dhcp server set dnscredentials.

Note

  • If the supplied credentials belong to an object that is a member of the DnsUpdateProxy security group, the next object to register the same name record in DNS will become the record owner.

  • If you specify credentials for the DHCP server to use when registering DHCP client computers in DNS, these credentials aren't backed up. After a DHCP database is restored, new credentials must be configured.