Can no longer connect to internet when I exit PIA app (Ubuntu 16.04)
I haven't had any problems after install v62 for Linux until today when I disconnected and closed the app to discover I could no longer connect to the internet. I can still connect to the internet when PIA is active.
How do fix this so I can access the internet when I'm not running PIA?
How do fix this so I can access the internet when I'm not running PIA?
Comments
When I get time I'll try installing v62 over v61 (instead of uninstalling like I did) and see if that helps.
https://www.privateinternetaccess.com/forum/discussion/comment/43156/#Comment_43156
Hello nedder,
Thanks for getting in touch regarding this concern. The killswitch is intended to stop your internet from working if by chance the VPN stops working. If you disconnect from the VPN with the killswitch still enabled, this will remove your connection, so you will need to disable the killswitch when your finished of the VPN in order to restore your connection.
Here is how we can check to see if the killswitch is still enabled:
Edit:
FYI I now am able to connect regularly to the internet. The solution I found feels like overkill... Seeing as there are several threads discussing how the DNS is the source of the problem and that there is a file /etc/resolv.conf which should be edited, I looked for that file (didn't have it).
Then I found the below line, which fixed my problem, after a google search:
sudo su
then I ran:
apt-get update --fix-missing
After a prompt from apt to do so.
Source:
https://askubuntu.com/questions/134121/how-to-restore-recreate-etc-resolv-conf-files
I just spent part of my day troubleshooting my Ubuntu notebook because of the PIA client. The reason it's breaking is because the dhclient service dynamically creates and modifies the resolv.conf file. The /etc/resolv.conf file is supposed to be a symbolic link to /run/resolvconf/resolv.conf. I didn't realize anything was wrong until I connected my notebook to another network and DNS was broken. The PIA client backed up the /etc/resolv.conf file which was generated when connected to my home network while it was a symbolic link. After running PIA, rather than restore the symbolic link, it restores the backup as a file, which broke DNS and was why I couldn't connect to anything. The dhclient service was updating the file in /run/resolvconf, but since the file in /etc was no longer linked to it, it was trying to use DNS servers for a network I was no longer connected to.
it took me a while to find what was wrong, after that it was easy to fix once I realized what happened. All you have to do is re-create the symbolic link to /run/resolvconf/resolv.conf in /etc and run dhclient to re-create the file.
This is something that needs to be fixed in the PIA client. Rather than backing up and creating a new file, then restoring the file after exiting, you should just be modifying the existing file, then when after disconnecting call dhclient to re-create the file for what is needed on the current local network.
What I can see happening however is that something could detect the symlink is no longer there and fallback to some sort of weird older behavior. In all fairness, Ubuntu really looks like they made their DNS solution a lot more complicated than necessary in order to support all the different methods of setting DNS and in particular upgrades from older versions. I think it's the fourth time Ubuntu changes the way it does DNS so far...
But yes I definitely agree the app shouldn't break it. I still haven't quite figured how it happens yet. The good news is, that part is likely going to have a rewrite soon-ish so hopefully it goes away with it. The correct way to set the DNS on Ubuntu would be to either use resolvconf instead of overriding it, or using systemd-resolved depending on whichever the user is using.
It's really like Ubuntu doesn't know which one it wants to use, which is the core of the resolv.conf issue with PIA. We basically have to handle all the different ways DNS could be setup, and as we've seen in this thread even backing up the symlink seems to not reliably work
Basically to reproduce just power off your machine by unplugging it or holding the power button. It will boot back with broken DNS.
You might need to reconnect your network in NetworkManager (or reboot) for it to work and resolvconf to update the config.
https://askubuntu.com/questions/249944/how-can-i-completely-remove-networkmanager
https://unix.stackexchange.com/questions/253030/how-to-setup-network-without-wicd-or-networkmanager
@d4rkcat I'd say it depends. If you base yourself on Ubuntu, it's a horrible, horrible mess. On saner distros it's less of an issue. It's like systemd in the Debian family: even as someone that loves systemd, I can't stand it on Debian because the implementation is just so aweful. It's a bit the same for NM: I've had my fair share of trouble with it, but I've never had any problem with it on Arch or any other distro that ships it more "vanilla". By default it just dumps DNS in resolv.conf the good ol' way.
When I'm connected:
When I'm disconnected:
╰○ readlink /etc/resolv.conf /run/NetworkManager/resolv.conf > cat /etc/resolv.conf # Generated by NetworkManager nameserver 127.0.1.1 > cat /run/resolvconf/resolv.conf # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN # 127.0.0.53 is the systemd-resolved stub resolver. # run "systemd-resolve --status" to see details about the actual nameservers. nameserver 127.0.0.53 > readlink /tmp/pia_resolv_conf_link /run/NetworkManager/resolv.conf > cat /tmp/pia_resolv_conf_link # Generated by NetworkManager nameserver 127.0.1.1When PIA is closed, same results as when I'm disconnected.
I tried the recommended fix while PIA was connected and it didn't work (for reasons I now understand). Recreating the symlink while PIA is disconnected resolved the issue for me.
I have attempted to uninstall PIA to see if that would work and when I did the internet still didn't... I fear that this may have messed everything up network wise.
https://www.privateinternetaccess.com/forum/discussion/30113/announcing-the-new-beta-program-for-the-desktop-application