0

My home server is assigned an IP address by my router (DD-WRT with Static DHCP; let's say it's 192.168.1.103) and is also assigned a name (let's say it's "kwtmserver").

With my (K)Ubuntu 14.04.05 (Trusty), I can connect to 192.168.1.103 and do ssh, OwnCloud, etc. However, it will not connect to "kwtmserver".

When I do "nslookup kwtmserver", it says:

Server: 75.75.75.75
Address: 75.75.75.75#53
** server can't find kwtmserver: NXDOMAIN

However, when I do "nslookup kwtmserver 192.168.1.1" (that IP address 192.168.1.1 is where my server is), then it correctly says:

Server: 192.168.1.1
Address: 192.168.1.1#53
Name: kwtmserver.lan
Address: 192.168.1.116

(The ".lan" part is default domain name on my LAN.)

The question is: how do I my system to use 192.168.1.1 as the default DNS? I've tried modifying /etc/resolv.conf, /etc/network/interfaces, etc. Yes, I have done "sudo restart network-manager" after modifications. Yes, the router has DHCP and DNSmasq turned on.

I've read the other web forum postings on what to try, but my question is: if modifying those files don't work, what is the best way to figure out which file determines what the DNS is? Is there something like "nm-tool dns --verbose" which will say "the DNS is 75.75.75.75 BECAUSE THAT'S THE SETTING IN /etc/SomeHiddenConfig/OverrideDNS.conf" or something like that?

Command-line solutions would be much appreciated; the KDE tools seem to be lacking in some of the knobs that the user gets to twiddle.

I realize that I can bypass this with /etc/hosts, but am hoping to do name resolution on the router instead of having to modify each of the /etc/hosts files on each of the laptops.

The most frustrating thing is: this used to work a few days ago, before a tripped circuit breaker, which should not have been related, caused some sort of cable modem and router trouble that required resetting each, but now they seem to be up and running again. I don't see how this would have affected the laptop selection of which DNS to use, though.

1 Answer 1

0

Well the tripped circuit breaker holds a clue, can give the router a factory reset, ie completely wipe its configuration, restart it and reconfigure it, or do you have a spare router to try, that might be even better. That is suggestion number one, otherwise editing /etc/hosts is not a bad thing at all, as far back as windows 95 the hosts file was the only way to get some sanity in a large network ( more than 2 windows machines) and if you dont have too many machines to do it on it is probably worth doing, but it does sound like the routers configuration is corrupted, so try that first

1
  • Hi. Sorry I wasn't clear. The router has already been reset; it works fine now (DD-WRT on a Netgear WNR3500L v2). I reloaded a saved configuration file and all the computers on the net work fine. You would know this from the fact that the command "nslookup kwtmserver 192.168.1.1" gives the correct response, as noted above. However, when I don't tell the "nslookup" command to use the DNS at 192.168.1.1, it defaults to my ISP's DNS of 75.75.75.75, as noted above. But how to get Ubuntu to correctly choose the router's the ISP DNS? That's not determined by the router configuration.
    – KWTm
    Oct 16, 2016 at 1:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.