Difference between revisions of "DNS Administration"

(New HowTo "DNS Administration")
 
m (/* Update page and added how to create a /16 reverse zone)
 
(47 intermediate revisions by 9 users not shown)
Line 1: Line 1:
 
= Introduction =
 
= Introduction =
  
If you're running Samba as Active Directory Domain Controller, you also have to administrate a DNS server.
+
If you're running Samba as Active Directory Domain Controller, you also have to administer a DNS server.
  
You will already find general [[DNS|information on the internal DNS and the BIND DLZ module]] and documentation about [[Dns-backend_bind|Bind as DNS Backend]] in the Wiki.
+
You will already find general [[The_Samba_AD_DNS_Back_Ends|information on the internal DNS and the BIND DLZ module]] and documentation about [[BIND9_DLZ_DNS_Back_End|Bind as DNS Backend]] in the Wiki.
 
 
This page will provide you details in administrating your DNS.
 
  
  
Line 13: Line 11:
 
= General =
 
= General =
  
Per default, Samba creates the following two forward zones during provisioning/upgrading (of course with your own domain name):
+
By default, Samba creates the following two forward zones during provisioning/upgrading (of course with your own domain name):
  
 
* '''samdom.example.com''': Zone for your domain.
 
* '''samdom.example.com''': Zone for your domain.
Line 24: Line 22:
 
= Features =
 
= Features =
  
The Samba internal DNS is a new implementation. Even if BIND is a grown up DNS and long in production on millions of servers, the Samba BIND DLZ module is also still new. That why both backends doesn't cover all features yet, you can setup with the Microsoft DNS tools. If you discover problems or missing features, please open a bug report/feature request at [https://bugzilla.samba.org/ https://bugzilla.samba.org/].
+
The Samba internal DNS is a new implementation. Although BIND is a grown up DNS and long in production on millions of servers, the Samba BIND DLZ module is still new. That's why both backends don't yet cover all the features that you can setup with the Microsoft DNS tools. If you discover problems or missing features, please open a bug report/feature request at [https://bugzilla.samba.org/ https://bugzilla.samba.org/].
  
But even if the internal DNS and the BIND DLZ modules are new, they both support all basic requirements for Active Directory and more.
+
Even though the internal DNS and the BIND DLZ modules are new, they both support all basic requirements for Active Directory and more.
  
  
Line 42: Line 40:
 
= Importance of DNS for Active Directory =
 
= Importance of DNS for Active Directory =
  
A working Active Directory is heavily based on a working DNS. It's not just for resolving IP addresses into names and vice versa. Clients find their Domain Controller/s and other important AD services by DNS queries.
+
A working Active Directory is heavily based on a working DNS. It's not just for resolving IP addresses into names and vice versa. Clients find their Domain Controller/s and other important AD services by DNS queries, this means that your clients must use your Domain Controller/s as their nameservers. Do not use anything else between your clients and Domain Controller/s.
 +
 
 +
 
 +
 
 +
 
 +
 
 +
= Administering DNS on Linux/Unix with samba-tool =
  
 +
== Creating a new zone ==
  
 +
As an example we'll add a reverse lookup zone.
  
 +
It is suggested that you use, wherever possible, one of the RFC 1918 zones, these are:
  
= Administrating DNS on Windows =
+
10.0.0.0/8
 +
172.16.0.0/12
 +
192.168.0.0/16
  
To administrate DNS from a Windows client, you have to install the DNS MMC Snap-In. See [[Samba_AD_management_from_windows|Samba AD Management from Windows]] for more details.
+
Using the first one: 10.0.0.0/8 will allow you to have a maximum of 16,777,214 ipaddresses.
 +
The second: 172.16.0.0/12 will allow you to have a maximum of 1,048,574 ipaddresses.
 +
The third: 192.168.0.0/16 will allow you to have a maximum of 65,534 ipaddresses.
 +
 
 +
You can, if you so wish, use different Subnet masks/CIDRs to split up the RFC1918 zones. For instance, using 192.168.0.0/24 (netmask 255.255.255.0) will you allow you to have a maximum of 254 ipaddresses.
 +
 
 +
== To create a /24 reverse zone ==
 +
 
 +
# samba-tool dns zonecreate <Your-AD-DNS-Server-IP-or-hostname> 0.168.192.in-addr.arpa
 +
Password for [administrator@SAMDOM.EXAMPLE.COM]:
 +
Zone 0.168.192.in-addr.arpa created successfully
 +
 
 +
== To create a /16 reverse zone ==
 +
 
 +
# samba-tool dns zonecreate <Your-AD-DNS-Server-IP-or-hostname> 168.192.in-addr.arpa
 +
Password for [administrator@SAMDOM.EXAMPLE.COM]:
 +
Zone 168.192.in-addr.arpa created successfully
 +
 
 +
Your new zone will be directly live without restarting Samba or BIND.
  
  
Line 55: Line 82:
 
== Adding new records ==
 
== Adding new records ==
  
* Navigate to the zone, where you want to to add a new record.
+
* Example: Adding an A record
  
* Right-click to it and choose the kind of record to add.
+
# samba-tool dns add <Your-AD-DNS-Server-IP-or-hostname> samdom.example.com demo A 192.168.0.55
 +
Password for [administrator@SAMDOM.EXAMPLE.COM]:
 +
Record added successfully
  
: [[Image:DNS_Manager_Add_records.png]]
+
* Example: Adding a PTR record to the 192.168.0.0/24 reverse zone
  
* Fill the fields and save the new entry.
+
# samba-tool dns add <Your-AD-DNS-Server-IP-or-hostname> 0.168.192.in-addr.arpa 55 PTR demo.samdom.example.com
 +
Password for [administrator@SAMDOM.EXAMPLE.COM]:
 +
Record added successfully
  
 +
* Example: Adding a PTR record to the 192.168.0.0/16 reverse zone
  
 +
# samba-tool dns add <Your-AD-DNS-Server-IP-or-hostname> 168.192.in-addr.arpa 55.0 PTR demo.samdom.example.com
 +
Password for [administrator@SAMDOM.EXAMPLE.COM]:
 +
Record added successfully
  
== Updating existing records ==
+
* Example: Adding a SRV record to _tcp.samdom.example.com
  
* Navigate to the zone that contains the record you want to edit.
+
# samba-tool dns add <Your-AD-DNS-Server-IP-or-hostname> samdom.example.com _demo._tcp SRV 'demo.samdom.example.com 8080 0 100'
 +
Password for [administrator@SAMDOM.EXAMPLE.COM]:
 +
Record added successfully
  
* Right-click the record and choose „Properties“.
+
:A note on SRV records: The order of the four parameters in the last field ("data") are 'hostname port priority weight' and have to be between '  '.
  
: [[Image:DNS_Manager_Change_record.png]]
+
* Example: Adding a NS record to samdom.example.com zone
  
* Edit the entry and save the changes.
+
# samba-tool dns add <Your-AD-DNS-Server-IP-or-hostname> samdom.example.com @ NS newdc.sambdom.example.com
 +
Password for [administrator@SAMDOM.EXAMPLE.COM]:
 +
Record added successfully
  
  
  
== Delete a record ==
+
== Updating existing records ==
  
* Navigate to the zone that contains the record you want to remove.
+
* Example: Changing an A record
  
* Right-click to the record and choose „Delete“.
+
# samba-tool dns update <Your-AD-DNS-Server-IP-or-hostname> samdom.example.com demo A 192.168.0.55 192.168.0.66
 +
Password for [administrator@SAMDOM.EXAMPLE.COM]:
 +
Record updated succefully
  
 +
* Example: Changing a SOA Resource Record
 +
: The data part of the SOA record consists of 7 space ('&#32;') separated elements in the following order:
 +
: ''nameserver, email, serial, refresh, retry, expire, minimum-ttl''
 +
: &nbsp;
 +
: The following example changes the host masters mail address:
 +
# samba-tool dns update <Your-AD-DNS-Server-IP-or-hostname> samdom.example.com @ SOA \
 +
  "dc1.samdom.example.com hostmaster.example.com 63 900 600 86400 3600" \
 +
  "dc1.samdom.example.com admin.example.com 64 900 600 86400 3600"
 +
Password for [administrator@SAMDOM.EXAMPLE.COM]:
 +
Record updated successfully
  
  
== Changing zone properties ==
 
  
* Right-click to a zone of which you you want to do changes.
+
== Delete a record ==
  
* Choose „Properties“.
+
* Example: Deleting an A record
 +
# samba-tool dns delete <Your-AD-DNS-Server-IP-or-hostname> samdom.example.com demo A 192.168.0.55
 +
Password for [administrator@SAMDOM.EXAMPLE.COM]:
 +
Record deleted succefully
  
'''Note''': Currently both DNS backends doesn't support all features, that can be setup in the dialogues. If you discover problems or missing features, please open a bug report/feature request at [https://bugzilla.samba.org/ https://bugzilla.samba.org/].
+
* Example: Deleting a NS record from samdom.example.com zone
  
 +
# samba-tool dns delete <Your-AD-DNS-Server-IP-or-hostname> samdom.example.com @ NS olddc.sambdom.example.com
 +
Password for [administrator@SAMDOM.EXAMPLE.COM]:
 +
Record deleted successfully
  
  
== Creating a new zone ==
 
  
As example we'll add a reverse lookup zone.
+
== Deleting a zone ==
  
* Right-click to „Reverse Lookup Zones“ and choose „New Zone“.
+
* Example: Deleting a reverse zone:
  
* The „New Zone Wizard“ appears.
+
# samba-tool dns zonedelete <Your-AD-DNS-Server-IP-or-hostname> 0.168.192.in-addr.arpa
 +
Password for [administrator@SAMDOM.EXAMPLE.COM]:
 +
Zone 0.168.192.in-addr.arpa delete successfully
  
* Zone Type: Select „Primary zone“ and „Store the zone in Active Directory“.
 
  
: [[Image:DNS_Add_Zone_Wizzard_1.png]]
 
  
* Zone Replication Scope: Depents on your needs.
+
== Listing existing zones ==
  
: [[Image:DNS_Add_Zone_Wizzard_2.png]]
+
* Example: listing secondary zones
 +
# samba-tool dns zonelist <Your-AD-DNS-Server-IP-or-hostname> --secondary -U administrator
  
* Reverse Lookup Zone Name: Depents on your needs.
 
  
: [[Image:DNS_Add_Zone_Wizzard_3.png]]
 
  
: Dynamic Update: Depents on your needs.
+
== Listing zone information ==
  
: [[Image:DNS_Add_Zone_Wizzard_4.png]]
+
* Example: showing information about a zone
 +
# samba-tool dns zoneinfo <Your-AD-DNS-Server-IP-or-hostname> <zone-name> -U administrator
  
* Finish the wizard.
 
  
Your new zone is direclty live. You don't have to restart Samba/BIND.
 
  
 +
== Listing zone records ==
  
 +
* Example: listing records from a zone
 +
# samba-tool dns query <Your-AD-DNS-Server-IP-or-hostname> <zone-name> @ ALL -U administrator
  
== Deleting a zone ==
 
  
* Right-click to a zone and choose „Delete“.
 
  
: [[Image:DNS_Delete_Zone.png]]
 
  
  
 +
= Administering DNS on Windows =
  
 +
To administer DNS from a Windows client, you have to install the DNS MMC Snap-In. See [[Installing RSAT|Installing RSAT on Windows for AD Management]] for more details.
  
 +
If you use the internal DNS server, there are the following known problems:
  
= Administrating DNS on Linux/Unix =
+
* Scavenging is not implemented yet. The error message "This function is not supported on this system" is returned.
 +
* Conditional forwarders are not implemented yet. The same error message as above is returned.
 +
* The DNS forwarder can only be changed in the smb.conf, not via the MMC Snap-In.
 +
* Creating static records. When a static record is created it has a timestamp and the option "Delete this record when it becomes stale". In Windows Active Directory, static records have a "static" timestamp and cannot be accidently deleted.
  
== Adding new records ==
 
  
* Example: Adding an A record
 
  
# samba-tool dns add <Your-Server> samdom.example.com demo A 10.99.0.55
 
Password for [administrator@SAMDOM.EXAMPLE.COM]:
 
Record added successfully
 
  
* Example: Adding a PTR record to a reverse zone
+
== Adding new records ==
  
# samba-tool dns add <Your-Server> 0.99.10.in-addr.arpa 55 PTR demo.samdom.example.com
+
* Navigate to the zone, where you want to to add a new record.
Password for [administrator@SAMDOM.EXAMPLE.COM]:
 
Record added successfully
 
  
* Example: Adding a SRV record to _tcp.samdom.example.com
+
* Right-click to it and choose the kind of record to add.
  
# samba-tool dns add <Your-Server> samdom.example.com _demo._tcp SRV 'demo.samdom.example.com 8080 0 100'
+
: [[Image:DNS_Manager_Add_records.png]]
Password for [administrator@SAMDOM.EXAMPLE.COM]:
 
Record added successfully
 
  
:A note on SRV records: The order of the four parameters in the last field („data“) are 'hostname port priority weight' and have to be between '  '.
+
* Fill the fields and save the new entry.
  
  
Line 163: Line 213:
 
== Updating existing records ==
 
== Updating existing records ==
  
* Example: Changing an A record
+
* Navigate to the zone that contains the record you want to edit.
 +
 
 +
* Right-click the record and choose „Properties“.
 +
 
 +
: [[Image:DNS_Manager_Change_record.png]]
  
# samba-tool dns update <Your-Server> samdom.example.com demo A 10.99.0.55 10.99.0.66
+
* Edit the entry and save the changes.
Password for [administrator@SAMDOM.EXAMPLE.COM]:
 
Record updated succefully
 
  
  
Line 173: Line 225:
 
== Delete a record ==
 
== Delete a record ==
  
* Example: Deleting an A record
+
* Navigate to the zone that contains the record you want to remove.
# samba-tool dns delete <Your-Server> samdom.example.com demo A 10.99.0.55
+
 
Password for [administrator@SAMDOM.EXAMPLE.COM]:
+
* Right-click to the record and choose „Delete“.
Record deleted succefully
+
 
 +
 
 +
 
 +
== Changing zone properties ==
 +
 
 +
* Right-click to a zone of which you you want to do changes.
 +
 
 +
* Choose „Properties“.
 +
 
 +
'''Note''': Currently both DNS backends don't support all features that can be setup in the dialogues. If you discover problems or missing features, please open a bug report/feature request at [https://bugzilla.samba.org/ https://bugzilla.samba.org/].
  
  
Line 184: Line 245:
 
As example we'll add a reverse lookup zone.
 
As example we'll add a reverse lookup zone.
  
# samba-tool dns zonecreate <Your-Server> 0.99.10.in-addr.arpa
+
* Right-click to „Reverse Lookup Zones“ and choose „New Zone“.
Password for [administrator@SAMDOM.EXAMPLE.COM]:
+
 
Zone 0.99.10.in-addr.arpa created successfully
+
* The „New Zone Wizard“ appears.
 +
 
 +
* Zone Type: Select „Primary zone“ and „Store the zone in Active Directory“.
 +
 
 +
: [[Image:DNS_Add_Zone_Wizzard_1.png]]
 +
 
 +
* Zone Replication Scope: Depends on your needs.
 +
 
 +
: [[Image:DNS_Add_Zone_Wizzard_2.png]]
 +
 
 +
* Reverse Lookup Zone Name: Depends on your needs.
 +
 
 +
: [[Image:DNS_Add_Zone_Wizzard_3.png]]
 +
 
 +
: Dynamic Update: Depends on your needs.
 +
 
 +
: [[Image:DNS_Add_Zone_Wizzard_4.png]]
 +
 
 +
* Finish the wizard.
 +
 
 +
Your new zone is directly live without restarting Samba or BIND.
  
Your new zone is direclty live. You don't have to restart Samba/BIND.
 
  
  
Line 194: Line 274:
 
== Deleting a zone ==
 
== Deleting a zone ==
  
* Example: Deleting a reverse zone:
+
* Right-click to a zone and choose „Delete“.
  
# samba-tool dns zonedelete <Your-Server> 0.99.10.in-addr.arpa
+
: [[Image:DNS_Delete_Zone.png]]
Password for [administrator@SAMDOM.EXAMPLE.COM]:
 
Zone 0.99.10.in-addr.arpa delete successfully
 
  
 +
= Administering DNS on Linux with admin-tools =
  
 +
You can administer DNS from a Linux client using the admin-tools DNS module. The admin-tools DNS module uses samba-tool as a backend. You can download an [https://appimage.github.io/admin-tools/ AppImage here].
  
 +
== Adding new records ==
  
 +
* Navigate to the zone where you want to to add a new record.
  
= Configuring clients to use your AD DNS server =
+
* Select the Action menu and choose the kind of record to add.
  
If you provide DNS server addresses via DHCP to your clients, configure your DHCP server to ship the adress/es of your DNS server/s.
+
: [[Image:Admin_tools_DNS_Manager_Add_records.png]]
  
For static configuration on the different Windows versions, continue reading.
+
* Fill the fields and save the new entry.
  
  
  
== Windows 8 ==
+
== Updating existing records ==
  
* Press [Win]+[W] and search for „Network and Sharing Center“ in Settings and open the app.
+
* Navigate to the zone that contains the record you want to edit.
  
: [[Image:Win8_Network_App.png]]
+
* Highlight the record, then select the Action menu and choose „Properties“.
  
* Click „Change adapter settings“.
+
: [[Image:Admin_tools_DNS_Manager_Change_record.png]]
  
* Right-click to your network adapter and choose „Properties“.
+
* Edit the entry and save the changes.
  
: [[Image:Win8_Network_and_Sharing_Center.png]]
 
  
* Click to your Internet Protocol (IPv4/IPv6) and click the „Properties“ button.
 
  
* Enter the IP address/es of your DNS server/s.
+
== Delete a record ==
  
: [[Image:Win8_DNS_Server_Addresses.png]]
+
* Navigate to the zone that contains the record you want to remove.
  
* Save the settings by clicking „OK“.
+
* Highlight the record, then select the Action menu and choose „Delete“.
  
  
  
== Windows 7 ==
+
== Creating a new zone ==
  
* Click to „Start“ and search for „Network and Sharing Center“.
+
As example we'll add a reverse lookup zone.
  
* Click „Change adapter settings“.
+
* Highlight „Reverse Lookup Zones“, then select the Action menu and choose „New Zone“.
  
* Right-click to your network adapter and choose „Properties“.
+
* The „New Zone Wizard“ appears.
  
: [[Image:Win7_Network_and_Sharing_Center.png]]
+
* Choose IPv4 or IPv6: Depends on your needs.
  
* Click to your Internet Protocol (IPv4/IPv6) and click the „Properties“ button.
+
: [[Image:Admin_tools_DNS_Add_Zone_Wizard_1.png]]
  
* Enter the IP address/es of your DNS server/s.
+
* Reverse Lookup Zone Name: Depends on your needs.
  
: [[Image:Win7_DNS_Server_Addresses.png]]
+
: [[Image:Admin_tools_DNS_Add_Zone_Wizard_2.png]]
  
* Save the settings by clicking „OK“.
+
* Finish the wizard.
  
 +
Your new zone is directly live without restarting Samba or BIND.
  
  
== Windows XP ==
 
  
* Right-click to „My Network Places“ and choose „Properties“.
 
  
* Right-click to your network connection and choose „Properties“.
+
== Deleting a zone ==
  
: [[Image:WinXP_My_Network_Places.png]]
+
* Highlight a zone, then select the Action menu and choose „Delete“.
  
* Click to your Internet Protocol and click the „Properties“ button.
+
: [[Image:Admin_tools_DNS_Delete_Zone.png]]
  
* Enter the IP address/es of your DNS server/s.
 
  
: [[Image:WinXP_DNS_Server_Addresses.png]]
 
  
* Save the settings by clicking „OK“.
 
  
  
 +
= Configuring clients to use your AD DNS server =
  
== Linux/Unix ==
+
* [[Windows_DNS_Configuration|Windows]]
 
+
* [[Linux_and_Unix_DNS_Configuration|Linux/Unix]]
Edit your /etc/resolv.conf and add a „nameserver“ entry for each DNS server and your search domain:
+
* [[MacOSX_DNS_Configuration|MacOSX]]
nameserver 10.99.0.1
 
nameserver 10.99.0.2
 
search samdom.example.com
 
  
  
Line 285: Line 359:
 
= Testing your DNS Server =
 
= Testing your DNS Server =
  
On Windows and *nix, you can use „nslookup“ to test if your computer can resolve records by using your DNS. Try resolving the name of your Domain Controller into its IP:
+
See [[Testing_the_DNS_Name_Resolution|Testing the DNS Name Resolution]].
 
 
# nslookup DC1.samdom.example.com
 
Server:        10.99.0.1
 
Address:        10.99.0.1#53
 
 
Name:  DC1.samdom.example.com
 
Address: 10.99.0.1
 
  
Nslookup will show you, which server was asked (10.99.0.1) and the result of your query (DC1.samdom.example.com has IP 10.99.0.1)
 
  
If your query can't be answered, because it doesn't exist, you'll receive
 
  
** server can't find DC9.samdom.example.com: NXDOMAIN
 
  
If you query a none existing DNS server, it would result in
 
  
;; connection timed out; no servers could be reached
+
----
 +
[[Category:Active Directory]]
 +
[[Category:DNS]]

Latest revision as of 09:27, 8 August 2019

Introduction

If you're running Samba as Active Directory Domain Controller, you also have to administer a DNS server.

You will already find general information on the internal DNS and the BIND DLZ module and documentation about Bind as DNS Backend in the Wiki.



General

By default, Samba creates the following two forward zones during provisioning/upgrading (of course with your own domain name):

  • samdom.example.com: Zone for your domain.
  • _msdcs.samdom.example.com: This is the ForestDNSZone, that contains several service records for the entire directory.



Features

The Samba internal DNS is a new implementation. Although BIND is a grown up DNS and long in production on millions of servers, the Samba BIND DLZ module is still new. That's why both backends don't yet cover all the features that you can setup with the Microsoft DNS tools. If you discover problems or missing features, please open a bug report/feature request at https://bugzilla.samba.org/.

Even though the internal DNS and the BIND DLZ modules are new, they both support all basic requirements for Active Directory and more.


Known/issues missing features



Importance of DNS for Active Directory

A working Active Directory is heavily based on a working DNS. It's not just for resolving IP addresses into names and vice versa. Clients find their Domain Controller/s and other important AD services by DNS queries, this means that your clients must use your Domain Controller/s as their nameservers. Do not use anything else between your clients and Domain Controller/s.



Administering DNS on Linux/Unix with samba-tool

Creating a new zone

As an example we'll add a reverse lookup zone.

It is suggested that you use, wherever possible, one of the RFC 1918 zones, these are:

10.0.0.0/8
172.16.0.0/12
192.168.0.0/16

Using the first one: 10.0.0.0/8 will allow you to have a maximum of 16,777,214 ipaddresses. The second: 172.16.0.0/12 will allow you to have a maximum of 1,048,574 ipaddresses. The third: 192.168.0.0/16 will allow you to have a maximum of 65,534 ipaddresses.

You can, if you so wish, use different Subnet masks/CIDRs to split up the RFC1918 zones. For instance, using 192.168.0.0/24 (netmask 255.255.255.0) will you allow you to have a maximum of 254 ipaddresses.

To create a /24 reverse zone

# samba-tool dns zonecreate <Your-AD-DNS-Server-IP-or-hostname> 0.168.192.in-addr.arpa
Password for [administrator@SAMDOM.EXAMPLE.COM]:
Zone 0.168.192.in-addr.arpa created successfully

To create a /16 reverse zone

# samba-tool dns zonecreate <Your-AD-DNS-Server-IP-or-hostname> 168.192.in-addr.arpa
Password for [administrator@SAMDOM.EXAMPLE.COM]:
Zone 168.192.in-addr.arpa created successfully

Your new zone will be directly live without restarting Samba or BIND.


Adding new records

  • Example: Adding an A record
# samba-tool dns add <Your-AD-DNS-Server-IP-or-hostname> samdom.example.com demo A 192.168.0.55
Password for [administrator@SAMDOM.EXAMPLE.COM]:
Record added successfully
  • Example: Adding a PTR record to the 192.168.0.0/24 reverse zone
# samba-tool dns add <Your-AD-DNS-Server-IP-or-hostname> 0.168.192.in-addr.arpa 55 PTR demo.samdom.example.com
Password for [administrator@SAMDOM.EXAMPLE.COM]:
Record added successfully
  • Example: Adding a PTR record to the 192.168.0.0/16 reverse zone
# samba-tool dns add <Your-AD-DNS-Server-IP-or-hostname> 168.192.in-addr.arpa 55.0 PTR demo.samdom.example.com
Password for [administrator@SAMDOM.EXAMPLE.COM]:
Record added successfully
  • Example: Adding a SRV record to _tcp.samdom.example.com
# samba-tool dns add <Your-AD-DNS-Server-IP-or-hostname> samdom.example.com _demo._tcp SRV 'demo.samdom.example.com 8080 0 100'
Password for [administrator@SAMDOM.EXAMPLE.COM]:
Record added successfully
A note on SRV records: The order of the four parameters in the last field ("data") are 'hostname port priority weight' and have to be between ' '.
  • Example: Adding a NS record to samdom.example.com zone
# samba-tool dns add <Your-AD-DNS-Server-IP-or-hostname> samdom.example.com @ NS newdc.sambdom.example.com
Password for [administrator@SAMDOM.EXAMPLE.COM]:
Record added successfully


Updating existing records

  • Example: Changing an A record
# samba-tool dns update <Your-AD-DNS-Server-IP-or-hostname> samdom.example.com demo A 192.168.0.55 192.168.0.66
Password for [administrator@SAMDOM.EXAMPLE.COM]:
Record updated succefully
  • Example: Changing a SOA Resource Record
The data part of the SOA record consists of 7 space (' ') separated elements in the following order:
nameserver, email, serial, refresh, retry, expire, minimum-ttl
 
The following example changes the host masters mail address:
# samba-tool dns update <Your-AD-DNS-Server-IP-or-hostname> samdom.example.com @ SOA \
  "dc1.samdom.example.com hostmaster.example.com 63 900 600 86400 3600" \
  "dc1.samdom.example.com admin.example.com 64 900 600 86400 3600"
Password for [administrator@SAMDOM.EXAMPLE.COM]:
Record updated successfully


Delete a record

  • Example: Deleting an A record
# samba-tool dns delete <Your-AD-DNS-Server-IP-or-hostname> samdom.example.com demo A 192.168.0.55
Password for [administrator@SAMDOM.EXAMPLE.COM]:
Record deleted succefully
  • Example: Deleting a NS record from samdom.example.com zone
# samba-tool dns delete <Your-AD-DNS-Server-IP-or-hostname> samdom.example.com @ NS olddc.sambdom.example.com
Password for [administrator@SAMDOM.EXAMPLE.COM]:
Record deleted successfully


Deleting a zone

  • Example: Deleting a reverse zone:
# samba-tool dns zonedelete <Your-AD-DNS-Server-IP-or-hostname> 0.168.192.in-addr.arpa
Password for [administrator@SAMDOM.EXAMPLE.COM]:
Zone 0.168.192.in-addr.arpa delete successfully


Listing existing zones

  • Example: listing secondary zones
# samba-tool dns zonelist <Your-AD-DNS-Server-IP-or-hostname> --secondary -U administrator


Listing zone information

  • Example: showing information about a zone
# samba-tool dns zoneinfo <Your-AD-DNS-Server-IP-or-hostname> <zone-name> -U administrator


Listing zone records

  • Example: listing records from a zone
# samba-tool dns query <Your-AD-DNS-Server-IP-or-hostname> <zone-name> @ ALL -U administrator



Administering DNS on Windows

To administer DNS from a Windows client, you have to install the DNS MMC Snap-In. See Installing RSAT on Windows for AD Management for more details.

If you use the internal DNS server, there are the following known problems:

  • Scavenging is not implemented yet. The error message "This function is not supported on this system" is returned.
  • Conditional forwarders are not implemented yet. The same error message as above is returned.
  • The DNS forwarder can only be changed in the smb.conf, not via the MMC Snap-In.
  • Creating static records. When a static record is created it has a timestamp and the option "Delete this record when it becomes stale". In Windows Active Directory, static records have a "static" timestamp and cannot be accidently deleted.



Adding new records

  • Navigate to the zone, where you want to to add a new record.
  • Right-click to it and choose the kind of record to add.
DNS Manager Add records.png
  • Fill the fields and save the new entry.


Updating existing records

  • Navigate to the zone that contains the record you want to edit.
  • Right-click the record and choose „Properties“.
DNS Manager Change record.png
  • Edit the entry and save the changes.


Delete a record

  • Navigate to the zone that contains the record you want to remove.
  • Right-click to the record and choose „Delete“.


Changing zone properties

  • Right-click to a zone of which you you want to do changes.
  • Choose „Properties“.

Note: Currently both DNS backends don't support all features that can be setup in the dialogues. If you discover problems or missing features, please open a bug report/feature request at https://bugzilla.samba.org/.


Creating a new zone

As example we'll add a reverse lookup zone.

  • Right-click to „Reverse Lookup Zones“ and choose „New Zone“.
  • The „New Zone Wizard“ appears.
  • Zone Type: Select „Primary zone“ and „Store the zone in Active Directory“.
DNS Add Zone Wizzard 1.png
  • Zone Replication Scope: Depends on your needs.
DNS Add Zone Wizzard 2.png
  • Reverse Lookup Zone Name: Depends on your needs.
DNS Add Zone Wizzard 3.png
Dynamic Update: Depends on your needs.
DNS Add Zone Wizzard 4.png
  • Finish the wizard.

Your new zone is directly live without restarting Samba or BIND.



Deleting a zone

  • Right-click to a zone and choose „Delete“.
DNS Delete Zone.png

Administering DNS on Linux with admin-tools

You can administer DNS from a Linux client using the admin-tools DNS module. The admin-tools DNS module uses samba-tool as a backend. You can download an AppImage here.

Adding new records

  • Navigate to the zone where you want to to add a new record.
  • Select the Action menu and choose the kind of record to add.
Admin tools DNS Manager Add records.png
  • Fill the fields and save the new entry.


Updating existing records

  • Navigate to the zone that contains the record you want to edit.
  • Highlight the record, then select the Action menu and choose „Properties“.
Admin tools DNS Manager Change record.png
  • Edit the entry and save the changes.


Delete a record

  • Navigate to the zone that contains the record you want to remove.
  • Highlight the record, then select the Action menu and choose „Delete“.


Creating a new zone

As example we'll add a reverse lookup zone.

  • Highlight „Reverse Lookup Zones“, then select the Action menu and choose „New Zone“.
  • The „New Zone Wizard“ appears.
  • Choose IPv4 or IPv6: Depends on your needs.
Admin tools DNS Add Zone Wizard 1.png
  • Reverse Lookup Zone Name: Depends on your needs.
Admin tools DNS Add Zone Wizard 2.png
  • Finish the wizard.

Your new zone is directly live without restarting Samba or BIND.



Deleting a zone

  • Highlight a zone, then select the Action menu and choose „Delete“.
Admin tools DNS Delete Zone.png



Configuring clients to use your AD DNS server



Testing your DNS Server

See Testing the DNS Name Resolution.