Domain Name System (DNS)¶
Introduction to DNS¶
BIND [#] _ is the de facto DNS server on the Internet, originally developed at the University of California, Berkeley and currently maintained by the Internet Systems Consortium. BIND version 9, rewritten from scratch to support the latest features of the DNS protocol is used by Zentyal’s DNS module.
[4] | http://www.isc.org/software/bind |
DNS cache server configuration with Zentyal¶
Zentyal’s DNS module always works as a DNS cache server for networks marked as internal, so if you only want your server to perform cache DNS queries, simply enable the module.
Sometimes, this DNS cache server might need to be queried from internal networks that are not directly configured in Zentyal. Although this case is quite rare, it may occur in networks with routes to internal segments or VPN networks.
Zentyal allows configuration of the DNS server to accept queries from these subnets by a configuration file. You can add these networks to the file /etc/ebox/80dns.conf with the option intnets=:
# Internal networks allowed to do recursive queries
# to Zentyal DNS caching server. Localnetworks are already
# allowed and this settings is intended to allow networks
# reachable through static routes.
# Example: intnets = 192.168.99.0/24,192.168.98.0/24
intnets =
And after restarting the DNS module the changes will be applied.
Zentyal’s DNS cache server will ask root DNS servers directly, which one will provide an authoritative resolution for each DNS request. Then it will store the data locally during the time period set in the TTL field. With this functionality you can reduce the time required to start each network connection, therefore increasing the look-up speed for users and reducing the overall Internet traffic.
To set the Zentyal server to use its own DNS cache server, which you just configured, go to Network ‣ DNS and set 127.0.0.1 as the first DNS server.
The search domain is basically a string that is added to a search in case a user defined string is unresolvable. The search domain is set on the clients, but it can be provided automatically by DHCP, so that when the clients receive the initial network configuration, they can also receive the search domain.
For example, your search domain could be foocorp.com, when a user tries to access the host example; as it is not present among its known hosts, the name resolution will fail, then the user’s operating system will automatically provide example.foocorp.com, resulting in successful name resolution.
In Network ‣ Diagnosis tools you have a tool for Domain Name Resolution, which by using dig shows the details of a DNS query to the server you have set in Network ‣ DNS.
Configuration of an authoritative DNS server with Zentyal¶
In addition to DNS cache, Zentyal can act as an authoritative DNS server for a list of configured domains. As an authoritative server, it will respond to queries about these domains coming both from internal and from external networks, so that not only local clients, but anyone can resolve these configured domains. Cache servers only respond to queries from internal networks.
The configuration of this module is achieved via the menu DNS, where you can add as many domains and subdomains as required.
To configure a new domain, display the form by clicking Add new. From here, you can configure the Domain name and optionally the IP address which will be referenced by the domain.
Once the domain has been created, you can define as many names as required within the table Names. For each of these names Zentyal will automatically configure reverse resolution. Moreover, for each of the names you can define as many Alias as necessary.
Normally the names point to the host where the service is running and the aliases to the services hosted in it. For example, the host amy.zentyal.com has the aliases smtp.zentyal.com and mail.zentyal.com for mail services and the host rick.zentyal.com has the aliases www.zentyal.com and store.zentyal.com, amongst others, for web services.
Additionally, you can define the mail servers responsible for receiving messages for each domain. In Mail exchangers you will choose a server from the list defined at Names or an external list. Using Priority, you can set the server that will attempt to receive messages from other servers. If the preferred server fails, the next one in the list will be queried.
It is also possible to set NS records for each domain or subdomain using the table Name servers.
It should be noted that when you add a new domain, the presence of a field called Dynamic, contains a value which is set to false. A domain is set as dynamic when it is updated automatically by an external process without restarting the server. If a domain is set to dynamic it cannot be configured through the interface. In Zentyal, dynamic domains are automatically updated by DHCP with the names of the hosts that have been assigned an IP address, see Dynamic DNS updates.