Re: wireless can DHCP but not DNS?
Tom Roche Thu, 22 May 2014 15:08:36 -0400
>> summary: box ethernets via wire, but all wireless fails, including known-good providers: `ifconfig -a` shows a wireless IP#, but `nslookup` fails. How to fix or debug?
Brian Thu, 22 May 2014 20:46:38 +0100
> You could compare (and post) /etc/resolv.conf on new and old machines.
Thanks! that is *almost* the solution to my problem:
It reminded me of something I previously read:
https://wiki.debian.org/NetworkConfiguration#The_resolvconf_program
>>> When resolvconf is properly installed, the resolv.conf configuration file at /etc/resolv.conf is replaced by a symbolic link to /etc/resolvconf/run/resolv.conf
And in fact the symlink I had made (more below) was gone:
me@NewBox ~ $ date ; ls -alh /etc/resolv.conf
> Thu May 22 15:18:49 EDT 2014
> -rw-r--r-- 1 root me 174 May 19 11:04 /etc/resolv.conf
me@NewBox ~ $ date ; cat /etc/resolv.conf
> Thu May 22 15:18:57 EDT 2014
> # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
> # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
> nameserver 192.168.1.1
And restoring the symlink restores my ability to DNS on other networks (other than wired to my own switch):
me@NewBox ~ $ date ; ls -alh /etc/resolvconf/run/
> Thu May 22 15:19:07 EDT 2014
> total 4.0K
> drwxr-xr-x 3 root root 100 May 22 15:13 .
> drwxr-xr-x 26 root root 1000 May 22 15:13 ..
> -rw-r--r-- 1 root root 0 May 17 22:54 enable-updates
> drwxr-xr-x 2 root root 60 May 22 15:13 interface
> -rw-r--r-- 1 root root 174 May 22 15:13 resolv.conf
me@NewBox ~ $ date ; sudo ln -sf /etc/resolvconf/run/resolv.conf /etc/resolv.conf
> Thu May 22 15:19:21 EDT 2014
me@NewBox ~ $ date ; ls -alh /etc/resolv.conf
> Thu May 22 15:19:27 EDT 2014
> lrwxrwxrwx 1 root root 31 May 22 15:21 /etc/resolv.conf -> /etc/resolvconf/run/resolv.conf
me@NewBox ~ $ date ; nslookup www.google.com
> Thu May 22 15:19:34 EDT 2014
> Server: 152.19.240.8
> Address: 152.19.240.8#53
So I'd declare this solved, except for one thing:
I've been logging the process by which I've been setting up the new box, and I see in my log that I previously made this symlink! So I'd like to know,
* how to prevent my resolv.conf symlink to be overwritten in future? or
* is there a way that I can be notified if/when something overwrites it in future?
FWIW, my currently-installed resolvconf is
me@NewBox ~ $ apt-cache policy resolvconf
> resolvconf:
> Installed: 1.74
> Candidate: 1.74
> Version table:
> *** 1.74 0
> 500 http://debian.linuxmint.com/latest/ testing/main amd64 Packages
> 100 /var/lib/dpkg/status
thanks again, Tom Roche <Tom_Roche@pobox.com>
Reply to: