I'm using a custom Ubuntu and I can't seem to use a DNS resolver. I updated my /etc/resolv.conf
file so it would contain the line nameserver 8.8.8.8
:
# cat /etc/resolv.conf
nameserver 8.8.8.8
but that doesn't seem to help:
# ping google.com
ping: bad address 'google.com'
# ping google
ping: bad address 'google'
# ping www.google.com
ping: bad address 'www.google.com'
Accessing 8.8.8.8 as it is works:
# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: seq=0 ttl=118 time=53.386 ms
64 bytes from 8.8.8.8: seq=1 ttl=118 time=53.398 ms
64 bytes from 8.8.8.8: seq=2 ttl=118 time=53.265 ms
64 bytes from 8.8.8.8: seq=3 ttl=118 time=53.293 ms
64 bytes from 8.8.8.8: seq=4 ttl=118 time=53.339 ms
I've tried looking for answers here but most of the suggestions were irrelevant, as I don't have /etc/resolvconf/resolv.conf.d/
, /etc/network/interfaces
or /etc/dhcp3/dhclient.conf
.
- Could it be that I have another network configuration file that disables my
/etc/resolv.conf
(The Linux I run had many programmers touching it along the years, and no one actually knows what exactly happens anymore...)? - How actually
ping
is executed? If I could understand whenping
checks/etc/resolv.conf
, maybe I could pinpoint why it isn't working
This is my /etc/nsswitch.conf
:
# cat /etc/nsswitch.conf
passwd: files rf
shadow: files
group: files
hosts: files dns
services: files
networks: files
protocols: files
rpc: files
ethers: files
netmasks: files
netgroup: files
automount: files
aliases: files
bootparams: [NOTFOUND=return] files
ps auxc | grep -i dns
OR ps auxc | grep -i resolv
BusyBox v1.11.2 () multi-call binary
Usage: ps
Report process status
Options:
w Wide output
ping 8.8.8.8
work ? – Soren A Oct 10 '18 at 13:02/etc/nsswitch.conf
, if present? – Daniele Santi Oct 10 '18 at 13:06nsswitch.conf
looks correct, can you donslookup google.com
and/ordig google.com
? – Daniele Santi Oct 10 '18 at 13:16cat /etc/*{release,version}
does call the release-host "ubuntu-desktop"). In short I have nodig / nslookup
. Given this new info, I was under the impression that the existence of/etc/resolv.conf
implies the functionality of a DNS resolver – CIsForCookies Oct 10 '18 at 13:21/etc/netplan/01-netcfg.yaml
? If so, can you add its content to your question – Nick Sillito Oct 10 '18 at 16:56cat /etc/resolv.conf
andps auxc | grep -i dns
andps auxc | grep -i resolv
. Let me know when you have it at @heynnema – heynnema Oct 10 '18 at 18:36fsck -f /
... if that doesn't work, typeexit
, thenfsck -f /
. Report back. – heynnema Oct 11 '18 at 12:41