In Ubuntu 16.04 I had no problems with VPN: after disconnecting I had Internet.
In Ubuntu 18.04 I have no Internet after disconnecting from the VPN. I can actually ping 8.8.8.8
but not www.google.com
hence I'm thinking DNS related issue.
A manual solution is to do $ sudo service network-manager reload
.
- What is causing the problem in Ubuntu 18.04, and
- How do we fix it permanently?
It could be related to this bug: https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1778946
SOLUTION
Edit the file /etc/ppp/ip-up.d/0000usepeerdns
Replace the following line:
With this code:
Restart the network manager:
I had a similar but different problem. When my Debian 4.19.37-5+deb10u1 loaded, it started NordVPN Version 3.2.0-4 . Whenever I disconnected the VPN, I had no internet connection. Though, local network was still accessible and DNS returned the correct IPs when attempting an internet ping. NordVPN would not reconnect. My only option was to reboot.
None of the solutions presented previously worked for me. Not even restarting manually the network manager service.
I had to uninstall (purge) and reinstall NordVPN following those instructions: https://support.nordvpn.com/Connectivity/Linux/1322207652/Troubleshooting-connectivity-of-Linux-app.htm
Now, I can connect and disconnect NordVPN as much as I want and I have internet access as expected in both situations. Still works after reboot.
Try this, it worked for me.
Disconnect from VPN
add: "nameserver 8.8.8.8" then save
OK, so I faced the same problem. My VPN was connected then I pressed CTRL + ALT + F11 then It went into some kind of sleep mode, and then I had to restart my laptop after long pressing power button. So then my internet and Gs connect stopped working, I uninstalled proton vpn but the problem still persisted, So what I did was just reinstalled protonvpn but how? my internet was not working, so I just entered
nameserver 8.8.8.8
andnameserver 8.8.4.4
in my/etc/resolv.conf
file and then I didn't reload networkmanager and my internet was working but as soon as I reload networkmanager or restart my laptop, resolv.conf changes to its default and internet stopped working. So I just changed resolv.conf file and then installed protonvpn again and tried connecting it, then I got a error message that you need to disconnect other vpn service or buy premium, So that means after uninstalling it, VPN still was in act somewhere so I just closed protonvpn and ransudo killall vpn
and thensystemctl restart NetworkManager
and viola my internet and Gs connect were working again!!!.I just wrote the whole scenario above so that someone with this problem doesn't get confused by complex commands answers.
The issues is with how to manage the /etc/resolv.conf. I removed manually the
nameserver
added by VPN client and restarted the NetworkManager./etc/resolv.conf before VPN:
/etc/resolv.conf after VPN:
I removed the top 2
nameserver
lines and restarted NetworkManager: systemctl restart NetworkManager.you need to kill the process, in terminal run the following:
find your process id:
in my case it was
14286
so I ran
sudo kill -9 14286
and, Hola! I can connect to the internet again :)
For Ubuntu 20.04
You can try this
sudo edit
/etc/ppp/ip-up.d/0000usepeerdns
Replace
with
Then restart your network manager
I always had some Internet interruption when using FortiClient VPN. A solution that always works for me :
Then all I have to do is reconnect to this network (and type the password, hum...) and Internet is back