Automatically Open and Close VPN

GCoco

Pulling my weight
Joined
Jun 29, 2015
Messages
340
Reaction score
116
Location
Louisiana
Is there a way to have VPN open and close automatically when opening or closing an app? Specifically I use OpenVPN and IVMS4500. Wife complains about the additional step and then never turns it off.
 

GCoco

Pulling my weight
Joined
Jun 29, 2015
Messages
340
Reaction score
116
Location
Louisiana
I know. My concerns are slowing down connection using home WiFi or when using 4G/LTE as well as banking over these safe networks (CC and banks will require additional security checks every time they are accessed since the IP address is new).

Maybe a better question is --- is there a VPN provider where you can list safe WiFi sites which disables VPN. Also I believe you do not need VPN when using your cellular provider; correct?
 

nayr

IPCT Contributor
Joined
Jul 16, 2014
Messages
9,329
Reaction score
5,325
Location
Denver, CO
the IP address is the same as your home IP, or should be if your running your own VPN Server.. so thats moot, its the same IP as if you used your WiFi w/out vpn.. using it over home wifi should not cause any slowdown at all unless your vpn server is very slow at crypto.

if you want to access your cameras when on a cellular connection, it will require VPN connectivity.. leaving the connection open is unlikely to cause any noticeable slow downs at all given the speeds of cellular connectivity.. the only potential downside to leaving VPN running on a cellular connection is if you get some traffic exempt from datacaps, ie netflix, slingtv, or pandora might not count against your data usage; but once you turn the VPN connection on those will start to chew up data.
 

GCoco

Pulling my weight
Joined
Jun 29, 2015
Messages
340
Reaction score
116
Location
Louisiana
I have VPN setup through my router and use OpenVPN.

When I am on LTE and with VPN on, my IP address is not my home IP address.
 

nayr

IPCT Contributor
Joined
Jul 16, 2014
Messages
9,329
Reaction score
5,325
Location
Denver, CO
sounds like its configured to only route your home subnet over VPN then, anything not on that subnet wont go over VPN at all (ie, 192.168.1.0/255.255.255.0)

in that case, leaving the VPN connection running all the time should not have any negative impacts; as only the traffic specific to your LAN will transverse the VPN link

though you dont get any encryption when on an unencrypted public wifi; so firing it up so you can surf the web securely from a public place wont actually help at all.. you might be able to create dual profiles on your devices.. one that routes just LAN traffic and you can leave running all the time, and another that routes all traffic that you can use when on an untrustworthy network.
 

GCoco

Pulling my weight
Joined
Jun 29, 2015
Messages
340
Reaction score
116
Location
Louisiana
Thanks nayr, I just put it together.

When I use VPNopen I can securely access my home network but all other traffic is non-VPN.

However, when I use PrivateTunnel, that secures all my internet connections.

So solution is to keep VPNopen always on so access to NVR is always secure but no encryption to the internet. If I need to access banking or credit cards away from home, just use 4G/LTE. Any shopping or such using a hotel WiFi, use PrivateTunnel or (just use 4G/LTE).

Do I have it figured out?
 

nayr

IPCT Contributor
Joined
Jul 16, 2014
Messages
9,329
Reaction score
5,325
Location
Denver, CO
your plan is very sound; you got it figured out quite well.
 

cuz

Getting the hang of it
Joined
Nov 4, 2018
Messages
124
Reaction score
40
Location
New England
Bumping this to see if anyone knows a way to automate the process of turning on and then off the IOS VPN when the NVR viewer is opened/closed. I am using an ASUS VPN Server on my router and only want to connect to that VPN when connecting remotely to my NVR. I was hoping IFTTT (If This Then That) could do it but I can't figure out how to make it work.
Thanks.
 

spammenotinoz

Getting comfortable
Joined
Apr 4, 2019
Messages
345
Reaction score
274
Location
Sydney
Yep found two solutions,
First requires a Mac "Apple Configurator" you can create a VOD (VPN on-demand profile), if you have a windows PC you can try and find a copy of the older iPCU (iPhone Configuration utility for windows)
Second use a VPN server that supports Cisco VPN clients for iOS.
Both these approaches let you configure VPN on-demand, only for specific domains.
Can I Use IOS 6+ VPN-On-Demand With OpenVPN? | OpenVPN
 
Top