Restarting or hibernating while VPN is connected breaks my internet connection

I am using ProtonVPN’s app. If I close my PC while ProtonVPN is still on, I lost my internet connection permanently. Restart, hibernate, or even sleep shut me off from connecting again. With or without VPN, there is no internet anymore. It just won’t work either with ethernet or Wi-Fi. Restarting again doesn’t solve the problem either. The only fix I can find is using Timeshift to restore from a date before I lose my connection.

I just uninstall the VPN app to prevent this from happening because I keep forgetting to close it before hitting sleep and the next morning I find my PC cannot connect to the internet.

How can I prevent this? I was using the same app on Ubuntu MATE for years and never had this problem.

This happens to me, too. I use ProtonVPNs app and I use Pop! Os. Fortunately it’s easy to fix.

The reason it breaks your internet connection is because it’s trying to route network data through VPN connections that are no longer valid, they become “invalid” when your PC goes to sleep.

You can easily delete these connections with a few commands in the terminal, so there’s no need to use Timeshift.

See the connections with: nmcli device

This will list connections like pvpn-ipv6leak-protection and pvpn-killswitch, etc.

Then just type sudo nmcli connection delete name-of-connection

for example:sudo nmcli connection delete pvpn-ipv6leak-protection

Do this for all of the listed ProtonVPN connections and then your connection should return to normal, and you can then re-connect to the VPN.

I have faced the same problem unfortunately, have to move my setup to kali

I’m not sure I visualise the exact issue you’re describing, but protonvpn has a kill switch; when the VPN is not on you can’t connect to the internet regardless of method. Uninstalling protonvpn doesn’t delete the kill switch for some reason; you’ll have to manually delete it from settings, under VPN.

You can use the default OpenVPN tools to connect to and use ProtonVPN.

You do not need to use the specific protonvpn client.

But you will lose some of the special protonvpn features.

As another comment mentioned the ‘killswitch’ feature of ProtonVPN (and other vpns) can get stuck ‘ON’ and cause issues when you try to turn off the VPN or otherwise have issues with it.

ProtonVPN has CLI tools that can help troubleshoot and toggle the kill switch.

You really do NOT want to uninstall protonvpn while the system is ‘stuck’ :slight_smile:

Good Luck - I see numerous posts every few months about VPN and Kill switches causing issues. Theres typically some firewall rule, or some file/command that can be tweaked to get things going, but it can be distro specific.


$ protonvpn-cli  ks --help

usage:  protonvpn-cli (ks | killswitch) [-h | --help]
        [--on | --off | --permanent]

optional arguments:
    --on            Start Kill Switch upon connecting to VPN
                    and stop it when disconnecting from VPN.
    --off           Stop and remove Kill Switch.
    --permanent     Start Kill Switch regardless of VPN connection.
                    Warning: This takes effect immediatly and you
                    might end up without internet connection.
                    Either connect to VPN or turn the ks off.
    -h, --help      Display help message.

examples:
    protonvpn-cli (ks | killswitch) --on
    protonvpn-cli (ks | killswitch) --off
    protonvpn-cli (ks | killswitch) --permanent
    protonvpn-cli (ks | killswitch) --help

Thank you so much!

Hmm, I think once I figure out the exact connection names, I can write (whatever those executable command text files are called) and called it “VPN off” and create a shortcut on the desktop.

I am sure there should be a setting somewhere but I couldn’t find it. I found some forum messages from some people experiencing the same thing on Fedora 36 or some other distro but couldn’t quite understand what those guys were talking about, it is above my grade.

I also tried to use browser extension instead of the app but for some reason there is no “connect” button on the extension, only “upgrade” :man_shrugging:

Deleting the VPN from there was the first thing I tried. Didn’t work.

I tried to change other things in VPN and network settings too but couldn’t figure it out. I don’t have much network knowledge.

When this happens, after I wake or open my PC again, ProtonVPN itself cannot connect to its own servers because it says I have no internet connection. Simply closing the app doesn’t fix the issue. I can understand that while the ProtonVPN app is on, connect or disconnect, my own regular internet not going to work, I must use VPN to connect but even after closing the app it still sticks in my network settings and doesn’t let go or something.

Yeah, this is what I thought. There is a setting somewhere that VPN apps changed and the OS just does not follow it up and expects it to be something else and just cannot reset it on its own and VPN stuck because it can’t see any internet connection either.

I just stop using it. I am only using it to see redgifs URLs that are banned in my shithole country. I can use some extension-type VPN solutions, it is just some porn gifs, don’t worth all the hassle.

The connection names should remain the same, and you can find them with nmcli device in the terminal.

As for the executable command text files - they are bash scripts :slight_smile:

Edit: typo fix

But can you see the internet icons (WiFi/ethernet)? Maybe it’s the drivers that stop responding. You haven’t had this issue before, and it only happens when you turn the pc off, with the VPN on?

I am only using it to see redgifs URLs

Just use the OpenVPN client then with ProtonVPN. Its quicker/easier to turn on/off with the OpenVPN tools.

I use it like once or twice a month for Blocked Youtube videos. :slight_smile:

I can see the ethernet and Wi-Fi icons, I can select my Wi-Fi, I can connect and disconnect ethernet, and everything works if you look at the icons but the pages just won’t load, and Dropbox cannot sync. It looks like it is connected to the internet but nothing can be downloaded or uploaded. The traffic is just stuck.

It only happens if I close my PC (or hibernate or even put it to sleep) while VPN was open.

use the OpenVPN client then with ProtonVPN

I don’t know how to do that. I’ll look into it when I have time, thanks for the help and info friend.

I’m guessing you’ve already tried the CLI to manually turn off the kill switch?

protonvpn-cli ks --off

Or you can delete it entirely with

nmcli d status

And then delete the entries (if you have them) with

nmcli c delete insert connection name

I also use protonvpn, but have never encountered this, and routinely suspend the laptop with the VPN on

you basically go to your ProtonVPN account page, and theres some settings file you download for the specific server you want to connect to, then import that file into OpenVPN.

I have several servers setup around the world setup which i just connect to for short times when I need a VPN.

The connections i imported show up in the network manager icon/menu - so i can quickly connect/disconnect to any of them.

No, I didn’t try any of this. Using CLI didn’t even cross my mind. You may call me a noob and I accept it but if I am using a GUI app I expect everything I need to do with it should be on the GUI and not some backdoor CLI setting. I am not against the CLI, I just do not like mixing GUI and CLI. I just don’t think a CLI way to solve a problem if the app has a GUI to use. I am not that much into it I guess :smiley:

Thank you for the info tho, I copied it and will use this method if the OpenVPN solution the other commenter suggested won’t work.

This seems useful, I will try, thank you.

Linux is many times using the cli, and to a lesser extent gui. A bit counterintuitive, but the cli is unarguably more powerful than a GUI would be.

Also I had a typo in my previous message for the kill switch, so check that. Good luck!