1

I am currently running Ubuntu 20.04.4 LTS on my Macbook Pro. I connect it directly to my home modem via an ethernet connection. A few days ago, I suddenly lost connection to the internet. I ran the sudo ping command in Terminal and got a message that read “Temporary failure in name resolution” which confirms the lack of internet connection.

Here’s the odd part: I connect my iPhone directly to the same modem with an ethernet connection as well using a Belkin adapter and the internet on this phone runs perfectly fine (I’m writing this message from it). This rules out issues with my ISP or the modem itself.

Here is what I’ve tried so far but didn’t resolve the issue:

  • Changed the ethernet port on the back of the modem (one of the ports could have been defective)
  • Connecting via wifi
  • Ran ClamAV to ensure no infections were on my computer
  • Ran BleachBit to clean up files and clear cache/cookies

I can’t seem to figure out what went wrong.

3
  • that is, no internet through cable and wifi? but can you ping your router/modem? normally, connected devices receive private ip addresses or real ip?
    – Andra
    May 1, 2022 at 15:19
  • To check connection more info is needed. Start with commands: ip a; ip r; cat /etc/netplan/*.yaml. Attach results to your question. May 1, 2022 at 16:33
  • You might consider voting their answer if it helped you. Cheers.
    – Raffles
    May 2, 2022 at 9:38

2 Answers 2

3

This worked flawless after reboot:

Cannot explain why this was necessary, but the solution came down to ensuring that the wired interface was "managed". I changed /usr/lib/NetworkManager/conf.d/10-globally-managed-devices.conf from:

[keyfile]
unmanaged-devices=*,except:type:wifi,except:type:gsm,except:type:cdma

to:

[keyfile]
unmanaged-devices=*,except:type:wifi,except:type:gsm,except:type:cdma,except:type:ethernet
3
  • Please be a little careful with copying and pasting answers across AU, there is a risk that such an answer will not be a perfect fit to each question it is applied to...
    – andrew.46
    Jun 26, 2022 at 2:08
  • I tried this and it worked! Also no need to reboot just sudo service network-manager restart in the end
    – William Le
    Jan 5 at 11:26
  • Works great in Kubuntu 22.04.01 (jammy). Thank you! Mar 2 at 22:16
2
sudo nano /etc/resolv.conf

add

nameserver 8.8.8.8

press ctrl+O then ctrl+x. type

nslookup google.com

does it work now?

11
  • I see “nameserver 127.0.0.53 “. Then the line below that reads “options edns0 trust-ad”. Do I overwrite 127.0.0.53 with 8.8.8.8? May 1, 2022 at 16:34
  • yes please. please change that line May 1, 2022 at 16:38
  • no problem. just add this line to that file and save it: nameserver 8.8.8.8 thats all May 1, 2022 at 16:44
  • When I type ctrl+O, I get a line that reads “File Name to Write: /etc/resolv.conf” Ctrl+X does nothing but make an error noise May 1, 2022 at 16:50
  • 2
    Thank you very much for your extremely prompt assistance. I hope I’ll be able to pay it forward to another someday. May 1, 2022 at 17:19

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.