This article explains how to troubleshoot the Domotz VPN on demand feature.
If you are trying to open a VPN tunnel to your Domotz Collector and you get the below error:

VPN Connection Error in Remote Connections Interface.
1. The page indicates "VPN Tunnel Closed" in the Remote Connections & VPN section.
2. Tabs are available for navigation: "Connections," "VPN," and "History." The "VPN" tab is active.
3. Under "VPN On Demand," the status shows "VPN is Closed" with an "Open Tunnel" button next to it, which can be used to attempt to open the VPN tunnel.
4. Below, instructions suggest downloading and importing a VPN config file from Domotz Pro to connect devices to the network.
5. An error message at the center states: "Something went wrong, please try again later." This suggests a temporary issue with the VPN connection attempt.
This will result in the VPN profile file not being download.
Here are the steps you can follow to fix your VPN on the demand feature:
1) Launch the domotz_bash in Program Files (x86)/domotz/lib/portable-git/bin

Navigating to the Bin Directory in Windows File Explorer
1. Open Windows File Explorer.
2. Navigate through the directory path:
- Select "This PC" from the left sidebar.
- Open "Local Disk (C:)".
- Go to "Program Files (x86)".
- Open the "domotz" folder.
- Proceed to the "lib" directory.
- Access the "portable-git" folder.
- Open the "bin" directory.
3. The bin directory contains files, such as "domotz_bash" and "sh", both labeled as applications with sizes of 44 KB each.
2) Move to C:/Program Files (x86)/domotz/lib/node_modules/domotz-remote-pawn-ng/openvpn and run
$ bash domotzvpn_win.sh force-reconf

Running a Script in Command Line to Reconfigure VPN
1. Open the command line interface (CLI).
2. Navigate to the open VPN directory by entering:
`cd /c/Program\ Files\ \(x86\)/domotz/lib/node_modules/domotz-remote-pawn/openvpn/`
3. Execute the VPN reconfiguration script by typing:
`bash domotzvpn_win.sh force-reconf`
These commands are used to access the specific directory and run a script that forces a reconfiguration of the VPN settings.