I'm on Ubuntu 18.04.3 and my internet suddenly stopped working.
I can ping local and WAN ip addresses and I have already restarted the network:
sudo service network-manager restartThese commands:
nslookup google.com 1.1.1.1
dig google.com @1.1.1.1both return: connection timed out; no servers could be reached
But dig in tcp mode works perfectly:
dig google.com @1.1.1.1 +tcpifconfig looks the usual.
I'm clueless as to what is happening. I don't know what's the service that's causing this that needs to restart. I know for a fact that rebooting fixes this problem since this has happened to me before so I thought I could ask this question to help for the future, so I understand what's going on.
11 Answer
It might be not actual anymore but I had very same issue and figured out the reason. The resolver was systemd-resolved and listened on 127.0.0.53. But my iptables has DROP policy on INPUT table and no rule allowing access to lo interface. I added this rule and it started coming!