Developers Documentation



301 error for file:

User Tools

Site Tools

Splitting DNS Caches to use Specific DNS Server for Domains

In certain cases you need the ClearOS server to use a different DNS server for its general lookups and a specific server for a certain domain. This is useful when using the Active Directory connector to maintain a DNS connection for your domain while using a different DNS server generally. This is particularly useful if your DNS servers are being overwritten by DHCP on your External interface.

You must not use a Split DNS Cache configured either this way or through the Active Directory Connector when using Gateway Management. Instead, use a Rainbow/Forwarding List in Gateway Management


The Active Directory Connector app now supports configuration of a Split Horzon DNS for up to two AD Domain Controllers through the webconfig.

In this example, we will use the internal DNS server to resolve any queries for mydomain.lan. You can modify the /etc/dnsmasq.conf, but it is better to create a new file /etc/dnsmasq.d/{anything_you_want}):

nano /etc/dnsmasq.d/domain.conf

Add the following to the end of the file:


Save the file and exit. Then restart the dnsmasq service:

service dnsmasq restart

Multiple DNS Servers

Adding additional DNS servers from within your organization can help to strengthen the robust nature of your DNS, especially for Active Directory configurations. To list additional servers, simply add them as additional lines:


Your AD DNS servers contain a list of all your domain controllers via SRV records that are discoverable via DNS. This way if your main server is down, looking up your other servers is possible from within Samba.

content/en_us/kb_o_splitting_dns_cache_to_use_specific_dns_server_for_domains.txt · Last modified: 2019/08/27 03:43 by nickh