Skip to content

Instantly share code, notes, and snippets.

@paneru-rajan
Created October 13, 2017 04:44
Show Gist options
  • Save paneru-rajan/208e0673aab1888e9bc6aedafdf61722 to your computer and use it in GitHub Desktop.
Save paneru-rajan/208e0673aab1888e9bc6aedafdf61722 to your computer and use it in GitHub Desktop.
[DNS Resolution Failure; Hostname lookup failure] When ping is not working on server #DNS #Hostname #ubuntu

#DNS Resolution Failure; Hostname lookup failure

###Here's what was happening to our vi vps at accessworld:

$ ping www.google.com                               
ping: unknown host www.google.com

$ telnet www.google.com.np 80
telnet: could not resolve www.google.com.np/80: Name or service not known

$ traceroute www.google.com
gethostbyname2: Host name lookup failure

###The solution was to add the following lines to /etc/resolvconf/resolv.conf.d/base

nameserver 8.8.8.8
nameserver 8.8.8.8
search accessworld.net

###and regenerate etc/resolv.conf with these new settings with the command sudo resolvconf -u

Sources:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment