-1

I have a pretty annoying nameserver problem on this ubuntu server of mine... I tried altering resolv.conf, i tried altering network/interfaces, i tried altering it trough the control panel, i just don't seem to get how to do it...

Do you guys know what could it be the answer if not those in those files?

I'm having problem even on troubleshooting this... I'm now totally lost.

additional info:

ping 8.8.8.8 - WORKS

ping ;myipadress; - WORKS

ping www.google.com - DON'T WORK

ping ;myDomainName; - WORKS (without the "www.") full content of /etc/resolv.conf

search maisideiasdigital.com.br
nameserver 8.8.4.4
nameserver 8.8.8.8

important part of content of /etc/network/interfaces

iface venet0:0 inet static
        address 93.188.165.192
        netmask 255.255.255.255
        dns-search google.com
        dns-nameservers 8.8.8.8 8.8.4.4

Result of curl www.google.com or dig www.google.com: not responding at all, just finishes at: could not resolve host: www.google.com

EDIT: I'm sorry, I'm a little bit newbie to those heavier server managements...

1 Answers1

1
  1. It could be that DNS is blocked by a firewall.

Try host www.google.com 8.8.8.8 so that you are directly querying Googles DNS servers. If you can ping 8.8.8.8, but that command fails I would look at iptables or any other firewall you may have.

  1. If the above works and you are convinced nothing is being blocked, look at /etc/nsswitch.conf which defines how host names are resolved.

Example nsswitch.conf entries from my systems that work

Ubuntu 16.10:

hosts:          files mdns4_minimal [NOTFOUND=return] resolve dns

Ubuntu 16.04:

hosts:          files mdns4_minimal [NOTFOUND=return] dns

And Ubuntu CentOS 7:

hosts:      files dns myhostname
Ryan Babchishin
  • 6,260
  • 2
  • 17
  • 37