I use Meraki AnyConnect VPN to connect to my home network. Is it possible to automatically connect to AnyConnect VPN when I leave home or disconnect from home Wi-Fi?
is your VPN setup under Settings>General>VPN & Device Management>VPN>Device VPN ?
Can u just press on the VPN toggle right under Battery settings in the Settings App?
Does ur VPN show up in the “Set VPN” action in shortcuts? (when u tap on VPN ; see image, where red part is, is where ur vpn should show up)
If yes to all, then u can just create an automation that triggers when u disconnect from the particular wifi network and have it connect to ur vpn with the “Set VPN” action.
Add > Scroll down to select “Wifi” > seleect your network(s) > select “Network Left” > select “Run Immediately” > Search for “VPN” and select “Set VPN”
- If your app allows their own options you can choose that too. For example Tailscale has their own option showing up in Shortcuts, but 1.1.1.1 doesn’t.
Select “Connect” and select your VPN from the list. You might also want to setup disconnection the same way once you connect to your home wifi.
I wanna do the same thing for dns , i use adguard dns but i can not use it when connected to my university wifi or else the wifi shows no internet, i want to automate this process that whenever i connect to my uni wifi the dns gets disabled and when i leave it enables again , idk if its possible or not i am a newbie.
Does your vpn have an on demand option? I use WireGuard and this function is built in.