DNS lookup issues only in specific network

I am running Ubuntu 20.04 on my work computer and I have a few issues when working from home.

When I am at the office, I can browse the internet without issues. However, when I decide to work from home there are some sites (like github.com) that simply do not work.

$ nslookup www.github.com
;; connection timed out; no servers could be reached

This is specific to my computer, as all the other devices in the house can access these "problematic" domains. If I really need to access the website, I create a Wi-Fi hotspot using my phone and connect my work computer to it.

Additionally, sometimes the lookup is successful and I manage to get a few precious seconds of connectivity, but this seems to be completely random.

Anyway, I searched around for some time and the only thing that makes sense for me is that this is due to DNS issues. I tried forcing my PC to use Google's DNS Servers, but the problem persists.

Can anyone shed a light on this problem?


It is likely a DNS problem. Try diagnosing with a few commands, and please post the output in the question, verbatim, and as text (not screen capture). To check connectivity

$ ping 8.8.8.8

Then

$ cat /etc/resolv.conf

and compare with another working Ubuntu if possible. Then

$ sudo tcpdump -n -i wlp0s20f3 host 8.8.8.8

and from another terminal

$ dig @8.8.8.8 www.google.com

and check what response you get in the first one. Ref. If you get something like

tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on wlp0s20f3, link-type EN10MB (Ethernet), capture size 262144 bytes
10:40:11.448275 IP 192.168.0.139.58832 > 8.8.8.8.53: 35577+ [1au] A? www.google.com. (55)
10:40:11.466551 IP 8.8.8.8.53 > 192.168.0.139.58832: 35577 1/0/1 A 172.217.172.68 (59)

that means you are transmitting and receiving. If you don't get the last line, you are not receiving.