ClearOS 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.


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/02/26 08:57 by NickH