[plug] split dns based on destination domain/cc

Brad Campbell brad at fnarfbargle.com
Sat Aug 11 08:06:55 WST 2012

On 11/08/12 07:59, Brad Campbell wrote:
> On 10/08/12 22:26, William Kenworthy wrote:
>> Not being a DNS expert I am looking for some ideas on how to solve a
>> challenge - I am running Bind as an internal caching nameserver with a
>> few private zones with iinet as upstream.
>> I would like to do a split DNS where queries for .com go to a nameserver
>> in the US via a VPN, whilst anything else stays with iinet. Bind can
>> use views but they are based on client address matches, not domain as
>> far as I can see.
>> Any ideas?
> Yep. Put dnsmasq in front of bind and tell it to route all *.com queries to the specific 
> nameserver you want.
> It's very flexible like that.
Sorry, not a lot of detail in that suggestion.

Something like this.
Set up dnsmasq to listen on say port 5353. Have two (or three) server lines in the dnsmasq config 
like this

server /com/
server #<- ns1.iinet.net.au
server #<-ns2.iinet.net.au

and make sure your bind forwarders is pointed at port 5353

When amnet was having issues with their dns, I set up dnsmasq to point to amnet, iinet and optus dns 
and then used the --all-servers option which sends the queries to all three in parallel. It then 
takes the first valid answer received and sends it down stream. It makes for _very_ fast resolution 
if one of those has the query cached.

More information about the plug mailing list