Score:0

VPN disconnects when switching networks

pr flag

TL;DR If I am connected to one network and then connect to VPN it works fine, but if I then connect to a different network then the VPN disconnects and tries to reconnect over the new network. I need it to stay "connected" while switching so I can maintain privacy and have mostly-unrestricted browsing using public wi-fi.

Currently using Kubuntu 23.04 (laptop).

I frequently use my school's wifi, since it's free and faster than what I can afford at home. The kicker is that a lot of websites and downloads are blocked (things like .io, gaming, Steam, social media sites, etc.), also they monitor everything you do. To get around this I figured out that all I need to do is connect to a VPN, however, the school's network prevents you from connecting to one.

So I found a solution: first I connect to a VPN using a mobile hotspot then switch over to the school's wifi. Somehow the VPN remains on (this works with Android and Windows 10/11).

But with Linux this does not work because it's like the VPN totally turns off/disconnects between networks and tries to reconnect using the school's wifi, which doesn't allow you to use a VPN...so it doesn't connect...

I commonly get the notification saying " deactivated because the device it was using was disconnected".

I've tried using different VPNs (Nord, Proton, Open) and different setup options (Proton's app, Nord via CLI, Nord and Open via configuration files) and even different distros (Kubuntu, Lubuntu, and Mint) but haven't fixed the problem.

Is there anything I can do to replicate the way VPN connections work on Windows and Android? That way it remains on when switching between internet connections.

Emre Talha avatar
ar flag
While switching networks your whole OS network changes. This includes your gateway, the router/machine that connects you to the internet and thus your public IP address also changes. So this means your VPN connection **has to be** reinitiated, because your VPN server has no idea what will your new public IP address be.
Zaph avatar
pr flag
How does this work then with Windows and Android? I've been thinking about that. Because idk why it works on Windows and Android. But the best I can figure is that it either stays connected to the current network until the next network is fully connected to allow for uninterrupted internet service OR somehow those OSes allow you keep your IP address from the VPN while switching.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.