# my router sucks at dns

## ksp7498

For a while I've been having an issue where my linux boxes (but not windows boxes, for some reason) took unusually long to resolve dns names.  It would take several seconds to resolve each website, while my 1 windows machine would always resolve instantly.  Well finally, on a hunch, I checked /etc/resolv.conf on my linux machines (they all use dhcp) and I noticed that the router was assigning itself as the first dns server.  Sure enough, if I removed 192.168.2.1 (the router) from /etc/resolv.conf and just left the 2 "real" servers, then dns resolved instantly like it should.

I used dhcp_ethx=( "nodns" ) on the machines so I could override the dhcp settings, and all was good.   But there's one problem: one of my machines is a laptop.  When I take it somewhere else and connect to another network, won't I need to have new dns servers assigned?  How can I make my laptop work correctly on other networks, but still have the "fixed" dns servers on my own network?  Anyone have any ideas?  Is there a way that I can blacklist 192.168.2.1 as a dns server or something?

----------

## cyrillic

Check your router's configuration to see if it has a "DNS proxy" or "DNS forwarding" setting, and turn it off.

I had the same problem with one of my old routers.  Eventually I tossed it, and switched to an old Gentoo box with 2 NICs, and I haven't looked back since.  :Smile: 

----------

## ksp7498

yeah I used to use a gentoo box + switch as my router, but I wanted to reduce the power usage and noise so I picked up this Belkin router a few months ago.  After some googling, it seems as though I'm not the only person with this issue, although Belkin denies that their router broadcasts itself as a DNS server.  Me, and a bunch of other people on the internet, beg to differ.   :Mad: 

It looks like I may be reinstating my gentoo router.  I looked all over the place in the router's configuration and I can't find any way to disable this behavior.

----------

## Inodoro_Pereyra

 *http://www.online-tech-tips.com/cool-websites/free-dns-server/ wrote:*   

> OpenDNS is a free DNS server that you can use for your computer, your home network or your organization. It provides a reliable name resolving service and adds extra security to your computer. To enjoy this powerful DNS service, you just need to change your current DNS settings to one or two OpenDNS IP Address - 208.67.222.222 or/and 208.67.220.220 . You can enjoy the whole, power packed services with no extra software or hardware, without even paying a dime.

 

Just use any public DNS server instead of the ones your ISP provides and thats it. No matter where you are connected, this will always resolve domain names to ip numbers.

Cheers!

----------

## ksp7498

 *Inodoro_Pereyra wrote:*   

>  *http://www.online-tech-tips.com/cool-websites/free-dns-server/ wrote:*   OpenDNS is a free DNS server that you can use for your computer, your home network or your organization. It provides a reliable name resolving service and adds extra security to your computer. To enjoy this powerful DNS service, you just need to change your current DNS settings to one or two OpenDNS IP Address - 208.67.222.222 or/and 208.67.220.220 . You can enjoy the whole, power packed services with no extra software or hardware, without even paying a dime. 
> 
> Just use any public DNS server instead of the ones your ISP provides and thats it. No matter where you are connected, this will always resolve domain names to ip numbers.
> 
> Cheers!

 

I just wanted to post back and say that this advice was awesome.  I set up all my computers to do dhcp without dns and I manually set the opendns servers, and it works great!

----------

## cach0rr0

i use opendns as well - for speed, as well because i can do very basic content filtering over at the parents' house (heaps of nieces and nephews using their systems, which, i force-fed them a healthy dose of linux for security reasons)

my cheapy little linksys WRT54GS allows you to define which DNS servers it pushes out on DHCP hosts 

i dont know if youre talking a proper sophisticated route or which, but that works for me

I have it push out 208.67.22.222, 208.67.220.220 as the dns servers. Dunno if your router has similar, but worth looking into. 

Meaning, on your router, if you dont wish to use opendns (say you have internal resources published in DNS that wont be resolvable using opendns), set it to push out your internal name servers.

----------

## poly_poly-man

wow... opendns? the very thing I have spent frustrating hours cursing at on other people's systems?

My desktop happens to be a DNS/DHCP server for the rest of my network, as well as providing a few other services...

the one thing I discovered that I will continue to do, even on a laptop and whatnot... install bind on the machine with issues. It will ask root-servers (and up the tree), so you get guaranteed accurate information, no junk like the random crap opendns does (searching for invalid queries? wtf?), and, as an added bonus, insanely better speeds due to smart caching (after you hit it up for a host once, it will remember it for a while - then you are only asking you local computer at nearly zero lag for the name service most of the time, rather than a faraway server every time.

it is the best thing I have ever done.

----------

## MaximeG

Hi,

Had the same issue in the past.

I didn't solve it, but turned to static IP instead.

Will try to disable the DNS broadcast anyway.

Regards,

Maxime

----------

## minor_prophets

ksp7498,

Can you post the model router you have had issues with so that others may avoid purchasing the same thing?

Thanks,

MP

my 2cents, djbdns is the route I went on a machine I'm using as a server.  The setup was ridiculously easy and virtually admin pain free.

----------

## MaximeG

@minor_prophets

Would be a nice idea indeed, but I'm afraid there is not only one routeur in the case  :Wink: 

Regards,

Maxime

----------

## minor_prophets

Yeah, I hear ya.

I've got 2 wrt54gs with dd-wrt firmware on both of them.  What a tremendous difference over the weak, weak, weak, sucky VxWorks firmware Linksys ships these things with.

The wrt54gs do there job well, but I'm really looking into using my Jetway VIA C7 book-size mini-itx for routing, firewalling, dns/dhcp, squid, etc.  Problem is noise.  While the model I have is purported to be "fanless", to remain consistently cool it needs at least one of the two case fans which are ridiculously loud.  So loud that if I have one plugged in, adding the second make little audible difference.  I bought Silex fans thinking they were small enough.  They weren't.  I really need to find tiny quiet fans.

----------

## poly_poly-man

 *minor_prophets wrote:*   

> Yeah, I hear ya.
> 
> I've got 2 wrt54gs with dd-wrt firmware on both of them.  What a tremendous difference over the weak, weak, weak, sucky VxWorks firmware Linksys ships these things with.

 you still can't ship a real dns server in that small.

again - try out running a caching server on your own box - it is very nice.

----------

## minor_prophets

@poly_poly-man,

At the moment, a server machine is doing dnscaching for my entire network.  Works out pretty well in combination with squid for all the machines I have.

----------

## poly_poly-man

 *minor_prophets wrote:*   

> @poly_poly-man,
> 
> At the moment, a server machine is doing dnscaching for my entire network.  Works out pretty well in combination with squid for all the machines I have.

 if you have a situation like that, it is very nice.

but if you're in the OP's situation, or, for example, your ISP forces opendns upon you, you'll want to run bind.

For example, I am running bind on my desktop, so my other computers need not run bind.

----------

## wuzzerd

I've had these issues for several years with the ActionTec modem sold to me by the phone co.  Like poly_poly-man  I just install bind, especially on laptops, since the local coffee shops use the same junk modems.  :Smile:   These use Linux, but I have yet to see a listing of the QWest version.

----------

## MaximeG

Hi,

Would I be bold and ask for what you use for _local_ DNS solution ?

Yes, I must admit I suck at networking, but I don't mind learning :p

If you have a good local (to install on one of my machine) dns solution (at least names for this solution) I'd be interested to try.

Regards && thanks,

Maxime

----------

## poly_poly-man

 *MaximeG wrote:*   

> Hi,
> 
> Would I be bold and ask for what you use for _local_ DNS solution ?
> 
> Yes, I must admit I suck at networking, but I don't mind learning :p
> ...

 as in, DNS for your local network?

I use bind... combined with dhcpd on the same machine, it's automatic... in addition to the hosts I define myself, I can simply turn on a machine and ping it by hostname.

----------

## MaximeG

Hi,

Nah, I mean : DNS caching for Internet.

Like, the first time I want to reach a link it has to download the actual target from the name, then the second time I want to reach it, it would be a local request.

If I'm not blind I've seen it in the thread.

Regards,

Maxime

----------

## poly_poly-man

 *MaximeG wrote:*   

> Hi,
> 
> Nah, I mean : DNS caching for Internet.
> 
> Like, the first time I want to reach a link it has to download the actual target from the name, then the second time I want to reach it, it would be a local request.
> ...

 any caching name server - bind is the most popular.

----------

## Simba7

 *wuzzerd wrote:*   

> I've had these issues for several years with the ActionTec modem sold to me by the phone co.  Like poly_poly-man  I just install bind, especially on laptops, since the local coffee shops use the same junk modems.   These use Linux, but I have yet to see a listing of the QWest version.

 

You mean the ActionTec GT-701 series? I have 3 of these and I put OpenWRT on all of them. Now, they do alot more than just be a DSL modem. I'm looking into putting all of them on a WDS soon. I did have to replace a cap in one of them.

As for a small router, why not find an "older" laptop and put a pair of CardBus NICs in it? I've done that with an old IBM Thinkpad (P233MMX, 64MB RAM, 2GB HDD). Just shove it in the closet or the basement and forget about it. That one actually has a Atheros Wireless card, a Ethernet Card, and a Ethernet USB Dongle. I think I paid $5 at the local rescue mission for the 'book.

It was replaced with what I have presently. The old laptop is my backup router and I only turn it on when something weird happens with the main router (like when it had a bad power supply).

----------

## minor_prophets

 *poly_poly-man wrote:*   

>  *MaximeG wrote:*   Hi,
> 
> Nah, I mean : DNS caching for Internet.
> 
> Like, the first time I want to reach a link it has to download the actual target from the name, then the second time I want to reach it, it would be a local request.
> ...

 

I just was wondering whether you tried djbdns, poly_poly-man?

----------

## overkll

What?  No mention of dnsmasq?  I'm surprised.  Personally I use bind, but dnsmasq is easy for beginners.  Tomato router uses it and I wouldn't be surprised if DD-WRT uses it as well.  It can also do DHCP.

dnsmasq is available in portage.

----------

## poly_poly-man

dnsmasq sucks. there's no caching, and you get dns exactly as bad as another server that you point it to.

and the dcp from that isn't that great either...

...ntm neither part has good configurability.

----------

## overkll

Did I hit a nerve? LOL.  I've never used dnsmasq, so I can't comment either way.  Just thought I'd throw it out there.

----------

## poly_poly-man

 *overkll wrote:*   

> Did I hit a nerve? LOL.  I've never used dnsmasq, so I can't comment either way.  Just thought I'd throw it out there.

 yeah... it sounds great...

...if you've never used it.

----------

