'can ping 8.8.8.8 but not google.com

I just got a new router and internet connection. My phone and my second computer have no problem to connect to internet (wifi or cable). My first computer, where I am running Limux Mint 18.1 Serena, can connect with cable or wifi but I am unable to browser. I can ping 8.8.8.8 but not google.com.

I do not understand much of DNS but I tried to follow some online tutorials. I tried to modify the /etc/resolconf directory by adding a resolv.conf file with a new servername but didn't work (even after restarting network-manager). I tried as well to modify the /etc/resolv.conf.d/tail file (as read in other tutorials) by adding a new servername but still not working.

Any suggestion?



Solution 1:[1]

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

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

Solution 2:[2]

The problem occurs due to trouble with DNS setting

If you are using linux follow:

Clear this file content (root permission required) nano /etc/resolv.conf Add the folling text: nameserver 1.1.1.1 nameserver 8.8.8.8 Save and Reboot

If using Windows Follow:

Control Panel\Network and Internet\Network and Sharing Center Select current active connection (wifi/broadband) Properties > Networking > ipv4 > custom dns > 1.1.1.1 & 8.8.8.8 check Validate setting upon exit > save

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Community
Solution 2 Aditya Shinde