VPN on demand and higher battery drain when in motion
-
- OpenVpn Newbie
- Posts: 7
- Joined: Wed Jul 24, 2019 12:32 pm
VPN on demand and higher battery drain when in motion
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!
-
- OpenVPN Protagonist
- Posts: 11137
- Joined: Fri Jun 03, 2016 1:17 pm
Re: VPN on demand and higher battery drain when in motion
Where do we start ...hawkeye217 wrote: ↑Thu Nov 19, 2020 4:32 pmiOS 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.
Just out of curiosity, why don't you turn your phone off when you are riding your bike ?
-
- OpenVpn Newbie
- Posts: 7
- Joined: Wed Jul 24, 2019 12:32 pm
Re: VPN on demand and higher battery drain when in motion
I use a fitness app to record ride data.TinCanTech wrote: ↑Thu Nov 19, 2020 8:51 pm
Just out of curiosity, why don't you turn your phone off when you are riding your bike ?
-
- OpenVPN Protagonist
- Posts: 11137
- Joined: Fri Jun 03, 2016 1:17 pm
Re: VPN on demand and higher battery drain when in motion
I think your phone is doing enough and most likely that is the best you will get out of your battery.
-
- OpenVpn Newbie
- Posts: 7
- Joined: Wed Jul 24, 2019 12:32 pm
Re: VPN on demand and higher battery drain when in motion
Regardless of what my phone is doing, my question remains the same as my OP. Is it possible to configure OpenVPN or VPN on demand to not attempt to connect the VPN at all for certain domains?TinCanTech wrote: ↑Thu Nov 19, 2020 11:07 pmI think your phone is doing enough and most likely that is the best you will get out of your battery.
-
- OpenVPN Protagonist
- Posts: 11137
- Joined: Fri Jun 03, 2016 1:17 pm
Re: VPN on demand and higher battery drain when in motion
No. That would be a function of your device.hawkeye217 wrote: ↑Thu Nov 19, 2020 11:59 pmIs it possible to configure OpenVPN or VPN on demand to not attempt to connect the VPN at all for certain domains?
You have a mobile wireless device on the move ..
Have you ever marched up a 1 in 4 incline with an open field radio ?
-
- OpenVPN Protagonist
- Posts: 11137
- Joined: Fri Jun 03, 2016 1:17 pm
Re: VPN on demand and higher battery drain when in motion
Should this be: "an one in four" ?
-
- OpenVPN Expert
- Posts: 685
- Joined: Tue May 01, 2012 9:30 pm
Re: VPN on demand and higher battery drain when in motion
so if Apple didnot phone home when you in motion openvpn use more battery or not? if you think that way you need to find out how normal openvpn do nothing and dont consume battery but when Apple phone home it use a lot? it that you say because of openvpn use more batery?
-
- OpenVpn Newbie
- Posts: 6
- Joined: Tue Jun 04, 2013 2:59 am
Re: VPN on demand and higher battery drain when in motion
Sorry to post on this, but not sure how / where else to ask . Fighting to get a mobileconfig file working - also with iOS 14. Any chance you can share your working file (with any secret / private information crossed out of course, but left in to see the fields)?
Thanks!!!
Thanks!!!