How to forward specific domain to specific upstream server


#1

How can I set up Pihole to forward specific domains to a particular upstream DNS server? For example, I want all .mydomain searches to go to a DNS server on the other side of a VPN tunnel, but all other searches to use the default configured upstream DNS.

Is this possible to setup in dnsmasq?

Thanks.


#2

Nevermind, I found the setting in dnsmasq.

I Added the following to /etc/dnsmasq.d/02-mydomain.conf:

server=/mydomain/192.168.1.1