Bypass OpenDNS and use ISP DNS servers for CDNs (DD-WRT)

3

1

I'm using OpenDNS at home with a DD-WRT router (Buffalo Airstation). While OpenDNS is great for many things, Content Delivery Networks don't play nice with it. I noticed this when I tried to rent a movie on iTunes and the playback was very choppy.

Is there a way in DD-WRT to specify different DNS servers to use for specific domain name lookups?

Basically I want *.apple.com to be resolved using the ISP DNS servers instead of the router configured OpenDNS servers.

John

Posted 2014-01-23T17:03:23.387

Reputation: 103

Not sure what DNS server DD-WRT is running. If it is DNSMasq, then it should be possible to do this, assuming you have a list of CDNs. I am not aware of any list of CDNs though. – Zoredache – 2014-01-24T01:13:44.497

@Zoredache Yes, it does have DNSMasq on it. Say, instead we want to allow *.apple.com to be resolved using the ISP DNS servers instead of the router configured OpenDNS servers. – John – 2014-01-24T15:24:01.980

Answers

3

Yes it can be done. We need to take advantage of a seldom-used dnsmasq configuration feature, the statement server.

You can find how to use it in Arch Linux wiki on dnsmasq, where it is stated:

To prevent OpenDNS from redirecting all Google queries to their own search server, add to /etc/dnsmasq.conf:

  server=/www.google.com/<ISP DNS IP>

It is clear that you can achieve the result you inquired about by means of the statement:

  server=/www.apple.com/<ISP DNS IP> 

where you will have to substitute your ISP DNS IP, which you did not provide in your OP.

This statement can be placed in the box Additional DNSMasq Options, which you can find in the panel Services, under the heading DNSMasq. You will have to enable both functions of DNSMasq,, and place the above line in the box Additional DNSMasq Options.

Save, restart, you are done.

MariusMatutiae

Posted 2014-01-23T17:03:23.387

Reputation: 41 321

Thanks! I will try this and if it works you'll get the accepted answer and bounty. I'll get back to you real soon. – John – 2014-01-30T20:50:29.427

Looks like it's working. iTunes seems to load content faster. As I live with the change, I'll post here if anything seems to not work. – John – 2014-02-03T18:00:24.973

It worked! iTunes is much smoother now. Thanks. – John – 2014-02-04T20:51:14.407