0

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.

  1. 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...)?
  2. How actually ping is executed? If I could understand when ping 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
11
  • 1
    Does ping 8.8.8.8 work ?
    – Soren A
    Oct 10, 2018 at 13:02
  • yeah, forgot to mention :-) Updated question Oct 10, 2018 at 13:04
  • 1
    Can you post the contents of /etc/nsswitch.conf, if present? Oct 10, 2018 at 13:06
  • @MrShunz from looking at man7.org/linux/man-pages/man5/nsswitch.conf.5.html, my nsswitch seems to be configured right (at least the hosts part, which is the relevant part, if I understand correctly) Oct 10, 2018 at 13:10
  • 1
    nsswitch.conf looks correct, can you do nslookup google.com and/or dig google.com? Oct 10, 2018 at 13:16

1 Answer 1

1

I am noob but I faced this issue just few day ago! I think you should recreate your resolve.conf file.

Use this command for recreation.

sudo resolvconf -u.

May be this helps!

1
  • This doesn't work on my machine [-sh: resolvconf: command not found], a sit is not exactly Ubuntu :-( I hoped it wasn't too far from Ubuntu, but I come to realize that it possibly is Oct 10, 2018 at 14:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .