Automatic VPNs with Cellular and WiFi Interfaces

I was told by Support that this is a bit of a corner case and likely not a priority to be addressed anytime soon. That said, I was wondering if other L5 users were doing anything similar to what I’m trying and encountering the same issue.

Under Advanced Networking, I have my WiFi configured to auto start a VPN connection. That works fine, as it does with my L13. Coming from an iPhone, where I use a VPN client to always encrypt my data connections whether on wifi or cellular data, I thought I could something similar. Under Advanced Networking, I configured my cellular networks to auto start a different VPN connection.

My intent in doing this is to ensure that my data is always VPN-encrypted whether at home on WiFi or if I leave the house on cellular data, and to enable this automatically. I know I can do it manually, but a) that’s a hassle at times; and b) sometimes I forget to do so.

What I have observed is that when I leave the house and wifi drops, my 4G data doesn’t work. Going into Settings and turning Mobile Data on/off and the Mobile connection altogether on/off doesn’t work. I have to reset the HKS, which brings up both 4g data and the VPN assigned to it. I have also seen that when I start the phone at home, wifi comes up with the VPN, but 4g and its VPN doesn’t work. This would be a non-issue I think if Chatty (from what I understand) could pull MMS and other messages over Wifi vs cell data. (Pardon my ignorance please if that’s not correct.)

Unfortunately, it doesn’t look like my VPN provider offers an arm64 VPN client to try, so I’m left with trying to get this work natively with the VPN profiles from my provider.

Anyone trying this as well with workarounds? Or at a minimum, similar experiences?

Thanks!

I’m using my provider’s wireguard version, which I set up in the Advanced Network Connections app. I can set it to run at startup, but I’ve found that if I do that, network data is disabled. I can toggle off the wg button in the L5’s quick settings dropdown, then toggle it on again to establish the data connection.

1 Like

I don’t know whether this helps but the generic approach to addressing that is to use a firewall - so that non-VPN traffic is blocked. If you forget to enable the VPN manually then network access just won’t work. (The question then is whether you will be able to distinguish that deliberate failure to work from other unintentional problems.)

1 Like

Thanks, I too wondered about mobile data not working without wifi turned on. Works fine at home with the wifi. Kind of a wrench in the works trying to use maps to navigate.

Depending on the port that your vpn is using it may be blocked on the mobile data side, which kind of sounds like what is happening here. This may vary from carrier to carrier. I’ll ask one of our wireless engineers if we allow tunneled traffic over the mobile data network.

I think that’s fine, since I have no issues enabling VPN when the wwan0 interface comes up. Issue seems to be that it doesn’t want to come up at the same time as the wlan0 interface does with its own VPN endpoint.

I’m trying out a new approach, where, in NetworkManager, I specify a higher priority for wlan0 vs my wwan0 networks. Maybe if they’re not coming up at the same time with the same priority, then that may help. If nothing else, I’m hoping it sets the preferred route over wifi vs wwan, which doesn’t seem to happen either when they both come up together.

I played around with the priority in ANM for my mobile data usage issue and it didn’t seem to make much difference, mind you I haven’t tried since disabling IPv6 globally on my phone. Since doing that my mobile data issue seems resolved. While not related to your issue could it be an IPv6 demon causing issues for the VPN? Just spit balling here.

1 Like