I can't use
git clone or even
apt-get install because I get a "cannot resolve host" error. They were working before, but I have no idea what changed that broke the DNS resolve. I can't find any information about what's going on.
ping google.com ping: unknown host google.com
telnet google.com telnet: could not resolve google.com/telnet: Name or service not known
nslookup google.com Server: 188.8.131.52 Address: 184.108.40.206#53 Non-authoritative answer: Name: google.com Address: 220.127.116.11 Name: google.com Address: 18.104.22.168 Name: google.com Address: 22.214.171.124 Name: google.com Address: 126.96.36.199 Name: google.com Address: 188.8.131.52 Name: google.com Address: 184.108.40.206 Name: google.com Address: 220.127.116.11 Name: google.com Address: 18.104.22.168 Name: google.com Address: 22.214.171.124 Name: google.com Address: 126.96.36.199 Name: google.com Address: 188.8.131.52
host google.com google.com has address 184.108.40.206 google.com has address 220.127.116.11 google.com has address 18.104.22.168 google.com has address 22.214.171.124 google.com has address 126.96.36.199 google.com has address 188.8.131.52 google.com has address 184.108.40.206 google.com has address 220.127.116.11 google.com has address 18.104.22.168 google.com has address 22.214.171.124 google.com has address 126.96.36.199 google.com has IPv6 address 2607:f8b0:4010:801::1009 google.com mail is handled by 50 alt4.aspmx.l.google.com google.com mail is handled by 10 aspmx.l.google.com google.com mail is handled by 20 alt1.l.google.com google.com mail is handled by 40 alt3.l.google.com google.com mail is handled by 30 alt2.l.google.com netstat -rn Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 0.0.0.0 188.8.131.52 0.0.0.0 UG 0 0 0 eth0 184.108.40.206 0.0.0.0 255.255.255.0 U 0 0 0 eth0
# /etc/nsswitch.conf # # Example configuration of GNU Name Service Switch functionality. # If you have the `glibc-doc-reference' and `info' packages installed, try: # `info libc "Name Service Switch"' for information about this file. passwd: compat group: compat shadow: compat hosts: files dns wins [NOTFOUND=return] networks: files protocols: db files services: db files ethers: db files rpc: db files netgroup: nis
Server: Ubuntu 14.04 trusty, Nginx, HHVM FastCGI
/etc/resolv.conf used to have the Google IPs (220.127.116.11 and 18.104.22.168) while it wasn't working. I say "used to" because I saw someone's solution was to reinstall
resolvconf, but since I can't resolve any hostnames, it just deleted it.
I reinstalled resolv.conf and it looks normal now, but DNS is still not resolving.
nameserver 2001:4860:4860::8844 nameserver 2001:4860:4860::8888 nameserver 22.214.171.124
127.0.1.1 my-domain.tld my-domain.tld 127.0.0.1 localhost ::1 ip6-localhost 1p6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts
Note: I'm kind of new to Linux, but hopefully I'm not missing something obvious. This is the first time I couldn't figure out a solution to a problem by searching online.