Different DNS Servers for spesific domain or url?

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Broadcom SoC based Hardware
Author Message
BennyBron
DD-WRT Novice


Joined: 25 Dec 2011
Posts: 22

PostPosted: Wed Jan 02, 2013 18:33    Post subject: Different DNS Servers for spesific domain or url? Reply with quote
Hello Everybody!
I have a Linksys E1200 V2 running
DD-WRT v24-sp2 (07/20/12) mega
(SVN revision 19519)

I am using opendns at the moment, but i suffer from speed impact on youtube due to the fact im not utilizing the ISP cache, as well as speed impact on several Israeli sites.
What I would like to accomplish is the following:
a. use opendns for primary browsing (all urls)
b. for specific urls i would like to use a different dns server


i do not want to change to isp dns because it is slow on most of the sites.

is what I described considered possible with dd-wrt? if so, how?
and if not, would you be kind enough to explain why not?
Sponsor
crashfly
DD-WRT Guru


Joined: 24 Feb 2009
Posts: 2026
Location: Sol System > Earth > USA > Arkansas

PostPosted: Thu Jan 03, 2013 3:33    Post subject: Reply with quote
Although I could be wrong, I think the only way you can use a "different" DNS server is to have your own 'local' server set up as a DNS host for your network and then make an appropriate settings change on *your* server.

Otherwise, it is not possible to use different DNS settings for just one site. Reason: there is no mechanism for DNS (that I know of) to do this.

One alternative method would be to locate all IP addresses for these sites and put them into a hosts file on your computer. Short of doing so call "tricks" with proxying software (having a local proxy software use different DNS), there does not appear to be another way.

_________________
E3000 22200M KongVPN K26
WRT600n v1.1 refirb mega 18767 BS K24 NEWD2 [not used]
WRT54G v2 16214 BS K24 [access point]

Try Dropbox for syncing files - get 2.5gb online for free by signing up.

Read! Peacock thread
*PLEASE* upgrade PAST v24SP1 or no support.
Malitiacurt
DD-WRT User


Joined: 16 Aug 2012
Posts: 190

PostPosted: Thu Jan 03, 2013 5:47    Post subject: Reply with quote
The DNSMasq option is what you're looking for.

Eg. I have it set up for tunlr

Code:

server=/cbs.com/184.82.222.5
server=/nbc.com/184.82.222.5
etc...


Default dns requests goes to the Google DNS servers, while those specific domains go through tunlr.
BennyBron
DD-WRT Novice


Joined: 25 Dec 2011
Posts: 22

PostPosted: Thu Jan 03, 2013 10:03    Post subject: Reply with quote
How can I check if it works correctly?
crashfly
DD-WRT Guru


Joined: 24 Feb 2009
Posts: 2026
Location: Sol System > Earth > USA > Arkansas

PostPosted: Fri Jan 04, 2013 4:28    Post subject: Reply with quote
Interesting Malitiacurt. I stand corrected. I suppose there is a way to do it.

@BennyBron - The way to test it would likely be to use the command "nslookup". With it, you can check the various IP addresses that would be returned from the different DNS servers. You go and visit your "different" DNS site, and see what IP it gives you and then compare that with nslookup.

_________________
E3000 22200M KongVPN K26
WRT600n v1.1 refirb mega 18767 BS K24 NEWD2 [not used]
WRT54G v2 16214 BS K24 [access point]

Try Dropbox for syncing files - get 2.5gb online for free by signing up.

Read! Peacock thread
*PLEASE* upgrade PAST v24SP1 or no support.
BennyBron
DD-WRT Novice


Joined: 25 Dec 2011
Posts: 22

PostPosted: Fri Jan 04, 2013 14:32    Post subject: Reply with quote
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Users\Benny>nslookup
Default Server: DD-WRT
Address: 192.168.1.50

>
>
>
>
>
>
>
> nslookup youtube.com
Server: youtube.com
Addresses: 2a00:1450:4001:c02::88
173.194.70.93
173.194.70.91
173.194.70.190
173.194.70.136

DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
*** Request to youtube.com timed-out
> nslookup www.youtube.com
Server: youtube-ui.l.google.com
Addresses: 2a00:1450:4001:c02::88
173.194.70.93
173.194.70.190
173.194.70.91
173.194.70.136
Aliases: www.youtube.com

DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
*** Request to www.youtube.com timed-out

What should I do?
crashfly
DD-WRT Guru


Joined: 24 Feb 2009
Posts: 2026
Location: Sol System > Earth > USA > Arkansas

PostPosted: Fri Jan 04, 2013 17:16    Post subject: Reply with quote
The "server" option in nslookup is for which *DNS* server you want to use. You *might* get different results with different DNS servers, but not always.
Code:
>nslookup
DNS request timed out.
    timeout was 2 seconds.
Default Server:  UnKnown
Address:  2620:0:ccc::2

> server 68.94.156.1
Default Server:  dnsr1.sbcglobal.net
Address:  68.94.156.1

> www.youtube.com
Server:  dnsr1.sbcglobal.net
Address:  68.94.156.1

Non-authoritative answer:
Name:    youtube-ui.l.google.com
Addresses:  2607:f8b0:4003:c02::5d
          74.125.227.6
          74.125.227.7
          74.125.227.8
          74.125.227.9
          74.125.227.14
          74.125.227.0
          74.125.227.1
          74.125.227.2
          74.125.227.3
          74.125.227.4
          74.125.227.5
Aliases:  www.youtube.com

> server 208.67.222.222
Default Server:  resolver1.opendns.com
Address:  208.67.222.222

> www.youtube.com.
Server:  resolver1.opendns.com
Address:  208.67.222.222

Non-authoritative answer:
Name:    youtube-ui.l.google.com
Addresses:  2607:f8b0:4001:c02::5b
          173.194.46.2
          173.194.46.4
          173.194.46.0
          173.194.46.1
          173.194.46.7
          173.194.46.8
          173.194.46.5
          173.194.46.3
          173.194.46.9
          173.194.46.6
          173.194.46.14
Aliases:  www.youtube.com

_________________
E3000 22200M KongVPN K26
WRT600n v1.1 refirb mega 18767 BS K24 NEWD2 [not used]
WRT54G v2 16214 BS K24 [access point]

Try Dropbox for syncing files - get 2.5gb online for free by signing up.

Read! Peacock thread
*PLEASE* upgrade PAST v24SP1 or no support.
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum