You are not logged in.

#1 2011-07-11 12:54:48

dkcampbell
Member
Registered: 2009-04-10
Posts: 11

Selective DNS Servers

What I'm trying to do is probably much easier to describe in pseudo code than anything else.

if (domain == "company.com" || subdomain("company.com")) {
    nameserver = xxx.xxx.xxx.xxx;
} else {
    nameserver = yyy.yyy.yyy.yyy;
}

I've been playing around with /etc/resolv.conf for a while, but haven't been able to get things quite right.  I'm also using for most DNS request dnsmasq running on a router, so if it's easier to handle this through dnsmasq let me know, but honestly I thought this is something I could do with resolv.conf or similar.

Offline

#2 2011-07-11 14:34:49

toofishes
Developer
From: Chicago, IL
Registered: 2006-06-06
Posts: 602
Website

Re: Selective DNS Servers

dnsmasq is where you want to do this. Take a look at the 'server' config option in the conf file, e.g. 'server=/example.com/10.8.0.1' will point all requests for example.com and subdomains to the DNS server running at 10.8.0.1.

Offline

Board footer

Powered by FluxBB