Thursday, April 25, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 951  / 3 Years ago, thu, june 10, 2021, 9:24:37

I upgraded from Ubuntu 20.04 to 22.04.1 yesterday.


Now, whenever I toggle wifi back on (from temporarily being off), I have no internet access.


I checked:


ls -lah /etc/resolv.conf
lrwxrwxrwx 1 root root 28 Feb 7 14:24 /etc/resolv.conf -> /opt/valet-linux/resolv.conf
cat /etc/resolv.conf

search attlocal.net
nameserver 127.0.0.1

Then I makes changes:


sudo vim /opt/valet-linux/resolv.conf
cat /opt/valet-linux/resolv.conf

nameserver 8.8.8.8

And then the internet works again.


But if I toggle Wi-Fi off and then back on, that file gets reset again.


I've already tried:


DNS


and:


cat /etc/netplan/01-network-manager-all.yaml 
# Let NetworkManager manage all devices on this system
network:
version: 2
renderer: NetworkManager
ethernets:
eth0:
nameservers:
addresses:
- 8.8.8.8
- 8.8.4.4


from https://linuxize.com/post/how-to-set-dns-nameservers-on-ubuntu-18-04/ and countless posts on AskUbuntu and StackOverflow.


I've also tried:


cat /etc/dhcp/dhclient.conf
...
# https://stackoverflow.com/a/48652642/470749
supersede domain-name-servers 8.8.8.8;

from https://stackoverflow.com/a/48652642/470749.


Nothing works. I'm losing my patience with Ubuntu.


What have I done to get myself in this mess? Thanks.


More From » networking

 Answers
3

Since I hadn't used valet-linux for years, I'd completely forgotten about it and didn't even recognize the name.


Thanks to @chili555 for the comment pointing out what I didn't even notice as unusual.


I finally found https://github.com/cpriego/valet-linux/issues/115#issuecomment-1406379951, which in combination with commands like the following (inspired by https://cpriego.github.io/valet-linux/#uninstalling), seemed to work:


composer global remove cpriego/valet-linux
sudo rm -rf /opt/valet-linux/
sudo systemctl revert systemd-resolved
sudo systemctl restart systemd-resolved
sudo apt-get remove dnsmasq
sudo rm /etc/resolv.conf
sudo ln -s /run/resolvconf/resolv.conf /etc/resolv.conf
sudo systemctl stop valet-dns
sudo systemctl disable valet-dns
sudo rm /etc/systemd/system/valet-dns.service
sudo systemctl daemon-reload
sudo systemctl reset-failed
sudo systemctl restart NetworkManager

[#44] Friday, June 11, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
itagde

Total Points: 241
Total Questions: 113
Total Answers: 118

Location: Liechtenstein
Member since Wed, Dec 8, 2021
2 Years ago
itagde questions
;