2

Everything was working just fine on office wifi, but suddenly I can't seem to browse any site. I can ping 8.8.8.8 just fine, but ping google.com returns ping: unknown host google.com. Also my browser can't seem to connect to any site.

I can browse just fine on other network tho.

Have tried solutions offered in

but still can't work it out. I'm running Ubuntu 16.04

nslookup google.com returned

;; connection timed out; no servers could be reached

cat /etc/resolvconf returned

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 8.8.8.8
nameserver 8.8.4.4
  • Do you have dnsutils installed? What does nslookup google.com return? – Philippos Jul 14 '17 at 6:00
  • @Philippos Sorry I forgot I was on different network on the previous comment, nslookup google.com returned ;; connection timed out; no servers could be reached – Avicenna Wisesa Jul 14 '17 at 6:13
  • So what's your /etc/resolv.conf? – Philippos Jul 14 '17 at 6:14
  • # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN nameserver 8.8.8.8 nameserver 8.8.4.4 – Avicenna Wisesa Jul 14 '17 at 6:19
  • 2
    How are you connected to the internet? It could be that there is some proxy letting pings pass, but blocking your DNS request. Don't you have a local DNS in that network? – Philippos Jul 14 '17 at 6:24
0

Your DNS resolving doesn't work.

  1. Check your firewall for an open port UDP/53 to 8.8.8.8

# iptables -L -n -v

  1. Check with your ISP for DNS server provided. They are probably blocking UDP/53 somewhere on the way out to force you to use internal DNS server.
    If you are on DHCP, renew the lease.
    Depends on distro (most probably networkmanager, ifdown/ifup combination may work as well). This happens quite often with resolvconfd and dnsmasq. You may need to restart the NetworkManager then
    Again - command depends on distro, usually with systemd

# systemctl restart NetworkManager

If you are on static IP and have noone to ask or check their config, you may sniff (tcpdump -nnvv -i <interface> udp port 53).

1

I was facing exactly the same issue, it's fairly obvious that's something related with the DNS and I finally solved adding the DNS servers of this way:

sudo vim /etc/resolvconf/resolv.conf.d/tail

write the DNS servers in the file:

nameserver 8.8.8.8
nameserver 8.8.4.4

Restart the NetworkManager service:

sudo systemctl restart network-manager.service

That's it, internet working again :)

0

193.168.x.x is an internal IP address which may point that you have a bad configured DNS server on your LAN. Taking advantage of dnsutils try the following:

dig google.com @8.8.8.8

Your query should return something like:

; <<>> DiG 9.11.0-P5 <<>> google.com @8.8.8.8
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 51198
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;google.com.                    IN      A

**;; ANSWER SECTION:
google.com.             299     IN      A       172.217.28.206**

;; Query time: 57 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Fri Jul 14 03:15:07 ART 2017
;; MSG SIZE  rcvd: 55

What is important to us is the ANSWER SECTION, which is telling what was the IP address returned by the foreign DNS server we talked to (@8.8.8.8)

Since you're probably going to get a WAN IP address in return to your query I would try to change the local DNS resolver to '8.8.8.8' (for testing purposes) and afterwards try to browse Internet.

If at that point you're able to browse and navigate then you should head to your DNS server and check the configuration to find out why is not being able to forward your queries, etc.

  • That internal DNS was on another network and is working correctly. The problem exists on a different network with 8.8.8.8 as name server. – Philippos Jul 14 '17 at 6:27
  • It returned ; <<>> DiG 9.10.3-P4-Ubuntu <<>> google.com @8.8.8.8 ;; global options: +cmd ;; connection timed out; no servers could be reached – Avicenna Wisesa Jul 14 '17 at 6:54

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.