VPN on demand and higher battery drain when in motion
Posted: Thu Nov 19, 2020 4:32 pm
I've set up a VPN on demand profile through a .mobileconfig on iOS 14.2 (OpenVPN app version 3.2.2) and all is working well. I've had the same setup also work well on previous versions of iOS and on other phones. But I've always had one notable issue that I have not been able to work around.
iOS tends to "phone home" to Apple's servers a lot, especially when I am in motion. I notice that when I'm out cycling, my battery tends to drain more than it should. I've traced this to my VPN on demand profile connecting through cellular data to presumably send location data back to Apple's servers - from my PiHole logs, I see domains like gs-loc.apple.com and some akamai.net servers being contacted every 5 minutes or so.
I don't mind the location data being sent (presumably for things like Find My iPhone), but the extra overhead of connecting to my VPN server through the on-demand profile every time drains the battery more than it should. Looking at the battery details under iOS settings shows OpenVPN as one of the highest culprits after coming back from a longer bike ride.
Has anyone else experienced this before and does anyone have any ideas on how to get around it? I've already set up some of the OnDemandRules in the mobileconfig file to disconnect the VPN when connected to my home's wifi, but I am not sure how to prevent the VPN from even connecting in the first place when trying to resolve those specific Apple domains that continually show up in my Pihole logs.
Any suggestions from anyone would be appreciated! Thanks!
iOS tends to "phone home" to Apple's servers a lot, especially when I am in motion. I notice that when I'm out cycling, my battery tends to drain more than it should. I've traced this to my VPN on demand profile connecting through cellular data to presumably send location data back to Apple's servers - from my PiHole logs, I see domains like gs-loc.apple.com and some akamai.net servers being contacted every 5 minutes or so.
I don't mind the location data being sent (presumably for things like Find My iPhone), but the extra overhead of connecting to my VPN server through the on-demand profile every time drains the battery more than it should. Looking at the battery details under iOS settings shows OpenVPN as one of the highest culprits after coming back from a longer bike ride.
Has anyone else experienced this before and does anyone have any ideas on how to get around it? I've already set up some of the OnDemandRules in the mobileconfig file to disconnect the VPN when connected to my home's wifi, but I am not sure how to prevent the VPN from even connecting in the first place when trying to resolve those specific Apple domains that continually show up in my Pihole logs.
Any suggestions from anyone would be appreciated! Thanks!