Ubuntu – Can ping 8.8.8.8 but can’t browse internet

dnsnetworkingUbuntuwifi

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

Best Answer

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).

Related Question