Writing /var/www/docs.clearos.com/data/cache/2/2894a91f24f885daefdced5af4414f74.metadata failed

DNS Server

The local DNS server does two things for your ClearOS network:

  • it associates local IP addresses with hostnames
  • it provides a caching DNS service for your local network


If your system does not have this app available, you can install it via the Marketplace.

You can find this feature in the menu system at the following location:

<navigation>Network|Infrastructure|DNS Server</navigation>


A host is defined as any system with an IP address – desktop, laptop, printer, media device, etc. Each host can have a hostname, along with any number of aliases. For example, you could add a hostname for a file server on your network with the following settings:

  • IP Address:
  • Hostname: fileserver.example.com

After adding the hostname, you are given an opportunity to add additional aliases (or hostnames) for the given host. If we were using the file server as a backup server, we could add backup.example.com to the list of aliases.

Tips and Tricks


You may have noticed that a default alias is added whenever you add a hostname. For example, adding the hostname fileserver.example.com will also add the default alias fileserver. This alias can be used as a shortcut on your network. How? If you use the ClearOS DHCP Server, you can specify a default domain name. Staying with our example, our default domain name should be set to example.com. Any system using DHCP could then access other systems on the network using the alias (fileserver) instead of the full hostname (fileserver.example.com).

Interface Specific DNS resolution

There may be cases where you want the DNS server to hand out a different IP address depending on which interface the query was received from. As an example, if you have a LAN with an IP address of and a HotLAN with IP addresses of and you had a web server running on ClearOS and you wanted to access it from the LAN and HotLAN, then you would want server.mydomain.com to return from the LAN subnet and from the HotLAN subnet as the two subnets are isolated from each other. This would be the case if you were trying to automatically discover a wpad.dat file from both LAN's. This can be done. In the DNS Server add settings: myserver.mydomain.com myserver.mydomain.com

. Then in /etc/dnsmasq.d, create a file (it can be called anything) and add a line:


Save the file and restart dnsmasq with a:

systemctl restart dnsmasq.service

Now the DNS server, if it has the choice, will hand out LAN specific IP addresses. If it does not have the choice, for example if the DNS server only had a single entry, that the IP of the single entry will be handed out on all LAN's. search?q=clearos%2C%20clearos%20content%2C%20Local%20DNS%20Server%2C%20app-dns%2C%20clearos7%2C%20userguide%2C%20categorynetwork%2C%20subcategoryinfrastructure%2C%20maintainer_dloper&amp;btnI=lucky

content/en_us/7_ug_dns.txt · Last modified: 2018/03/28 11:18 by nickh