-2

I have static IP in my Debian Lenny system and ping by IP to Internet works fine. Unfortunately www.google.com is not resolved by name. I can't install any additional software to my Linux since it does not resolves names.

/etc/network/interfaces:

# Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or
# /usr/share/doc/ifupdown/examples for more information.

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface uses static address
auto eth0
iface eth0 inet static
        address 192.168.1.99
        netmask 255.255.255.0
        broadcast 192.168.1.255
        network 192.168.1.0
        gateway 192.168.1.1
        dns-nameservers 8.8.8.8

How to trace DNS request with standard tools in order to find problem?

  • 3
    what is in /etc/resolv.conf? – ctrl-alt-delor Sep 26 '18 at 16:33
  • 1
    Like @ctrl-alt-delor said, please edit your question and include the content of /etc/resolv.conf. Also, is ping 8.8.8.8 successful? – Andy Dalton Sep 26 '18 at 17:17
  • /etc/resolv.conf contained wrong IP. I was expecting dns-nameservers 8.8.8.8 is main place for DNS server – vico Sep 27 '18 at 7:34
  • @vico have you answered your own question? If so then put it in the answer section. – ctrl-alt-delor Sep 27 '18 at 9:05
  • I would like to clarify why resolv.conf is stronge then dns-nameservers – vico Sep 27 '18 at 12:25
0

It seems this could be a DNS resolution issue on your Debian device.

Try this:

echo "nameserver 8.8.8.8" > /etc/resolv.conf # create the file and add the statement as first line
echo "nameserver 8.8.4.4" >> /etc/resolv.conf # append to existing file at the end

This should fix your issue.

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.