What is everyone using to connect to their HA instance via the iOS app that doesn’t require an open port?
Currently I have port 8123 open on my router which I would like to get rid of.
I run PFsense for my router and a VPN or reverse proxy should be doable but im not sure how that would work with the iOS app. I would like to make the process automatic/invisible as my wife uses the app.
Just went ahead and setup VPN On Demand (needed to set up my VPN again anyway since getting new iPhone X). It’s okay thus far. I configured the rules as follows:
I figured out how to write the rules from here. I already had the rest of the profile created via Apple Configurator. I have pfSense and use IKEv2/IPSec so I just searched for “pfsense ios ikev2” and found a couple of good guides on how to initially set it up.
This setup will cause my VPN to automatically activate whenever Home Assistant tries to connect. Should work nicely for anyone that can run a VPN on their network.
Yeah that’s why I set it up as VPN On Demand. I also set the idle timeout to 60 seconds, so hopefully when it does connect it only stays that way for a minute at most.
But what about sending location updates? Does that not need to connect to HA? For the incoming notifications I understand it goes via Apple’s infrastructure.
If everything works nicely then a location update should cause the VPN to activate. I’m seeing similar behavior already when using actionable notifications which also requires a callback request. It takes a few seconds longer than normal so that the VPN can connect first.
Following your post, I decided to give it a try and potential is there.
I was also wondering if it would be possible to disconnect the VPN connection when not needed anymore, which I suppose was your goal with this idle timeout.