3

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
  • 103
  • 2
  • 15
  • 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 Jan 24 '14 at 01:13
  • @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 Jan 24 '14 at 15:24

1 Answers1

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
  • 46,990
  • 12
  • 80
  • 129
  • 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 Jan 30 '14 at 20:50
  • 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 Feb 03 '14 at 18:00
  • It worked! iTunes is much smoother now. Thanks. – John Feb 04 '14 at 20:51