Hi, it would be great if HA could control the Fritz VPN (in my case WireGuard) and turn it on/off. This way I could use HA to put the VPN control on a button (like the Ikea on/off battery button). My wife would be very happy to not have to log in to Fritz, navigate to VPN menus, to toggle the VPN. Unfortunately, not even the Fritz Android app has a shortcut to the VPN control. Need to log in to Fritz. Thanks a lot for all the great work!
why do you want to switch it on or off? should not the wireguard setting on the device which connects to the fritzbox takes care to switch the vpn on or off?
Deluxestyle is correct, you don’t need to switch WG on/off on your fritzbox.
You setup a WG connection on the fritzbox (once), you use those the associated codes to setup WG on an iPhone/Android phone (need to install WG app for this).
Now with the phone you can establish the vpn connection (switch it on/off), no need to login to your fritzbox anymore.
I signed up to this forum to ask the same question. I have the same need; I want an easy toggle to switch the WG tunnel on/off.
This Wireguard tunnel is switched on on the Router itself, and goes to a VPN provider, so that all Internet traffic to the router is encrypted, and all devices connected to it are using the same VPN.
Is there any way to get a toggle for that?
You are mistaken, there is no VPN provider in between.
You setup wireguard in your Fritzbox for a particular device, you share the key that is created with that device (like an iPhone).
If you now activate the VPN connection (ie wireguard) on your iPhone, it establishes a direct VPN link between your device and your Fritzbox, there is no VPN provider in between.
To disconnect, you switch off the VPN connection on your device (breaks the link between your device and your Fritzbox)
So there is no need to switch off the VPN connection on your Fritzbox.
Again, you only need the Fritzbox once, to configure the initial wireguard setup.
(I’m using this now for about two years, never had to look at my Fritzbox to do any “switching”.)
Hope this is helpful.
Sorry, but no. You refer to a connection between a mobile device and the router.
I am talking about a tunnel from the router to a VPN service, which is different. If I enable that VPN service on the router (I need to do that in the web interface), then all my devices inside my home network will connect through the tunnel of the VPN provider to the outside world. These devices do not need to have any VPN client running.
Sometimes I want to disable that VPN service because it can cause some connection issues (streaming services or banking). It would be great to have a single button for that in HA. I hope I explained it clearer now.
Is there any update about this subject perhaps? Thanks!
I want to upvote this.
then you should also vote for this feature request - at the moment there a zero votes
see Feature Request Guidelines đź“”
anyway, as already explained in another VPN related request, there are no API endpoints about the VPN states, nor their configuration - see Add sensor to Fritz!box integration for status of External acces. (wireguard VPN) - #3 by mib1185
This would also explain, why there is no such possibility in the manufacturers own app.
You could check out this HACS integration: FritzBox VPN
To explain my use case and why I was asking the question. I have a vacation home with Reolink cameras connected to a RLN12W nvr and a wireguard vpn to my home. I built an alarm system in home assistant that has different presence modes (home, away, 6 of them) and next to the intrusion system (contacts and shutters) I would like to control the cams. When present at the house (depending on the presence mode) I would like to disable indoor and outdoor cameras. Unfortunately Reolink cams don’t have this feature. I know they now have privacy mode on select E1 models, but it is not working for me at the moment and I am in contact with Reolink on this. So my second best solution is to turn off internet transmission (still recording and local cams active). The Fritz Box that I use as a router in the vacation home allows me to turn on/off internet tranmission per IP client in home assistant. Two problems: Since wireguard is not a internet transmission in this case (for the Fritz Box), the switch doesn’t do anything. This is why I am asking the question to turn off the wg vpn. Then Reolink clients (Android app, windows client) then would use internet access and I could use the Fritz switch to turn on and off. This is my use case. Just to be complete, my second problem using the Fritz switch is that I have all the cams (except the doorbell) on a RLN12W router. So they are not on the Fritz Box and I can only turn the whole router on and off per Fritz switch, but not each camera individually. But better than nothing. At the moment, I need to log in to the Fritz Box and turn off wg vpn manually. I would like to do this from within ha. In parallel I am working on getting the Reolink privacy mode to work and using smart plugs for cams that don’t have privacy mode (about 50% of my cams) as an alternative. The hint about the Fritz VPN integration is great and I was not aware of this plug-in. Another idea I have is to have all cams on the FritzBox (still usr nvr to record), and have all cctv be excluded from the vpn so I can use the Fritz switch per cam to control internet access.
Excellent, thank you!
Makes you wonder about the remarks from @wimjanse above ![]()