Hi community,
I am using OpenVPN GUI V 2.6.1 on My Win 7 (64x).
The task is very simple - how can I make GUI to connect automatically to the necessary configuration and disconnect the initial ?
The detailed description of the issue is below:
1. I am connected to cfg successfully.
2. I want to switch to another cfg and click "connect":
3. I get the following error afterward (see the screenshot):
"connecting to configuration has failed"
Why should I first disconnect the initial connection and only after that connect to another? It is not convenient at all.
I tried OpenVPN connect, and it works perfectly, but for some reason I need to use OpenVPN GUI.
P.S: Just added the new TAP-Windows adapter V9 #2 - GUI shows that I have connected to both configurations, which is not a solution.
I just want to connect to the desired configuration in just one click and disconnect automatically the 1st one, not working simultaneously - that's all (like realized in another vpn services :NopvVPN,mullvad, Windscribe etc).
Any ideas on how to fix it?
Thank you in advance.
Connecting has failed (how to make GUI to connect automatically)
Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech
Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
-
- OpenVpn Newbie
- Posts: 1
- Joined: Sat Mar 25, 2023 10:46 pm
-
- OpenVPN User
- Posts: 39
- Joined: Sat Oct 02, 2021 3:57 pm
Re: Connecting has failed (how to make GUI to connect automatically)
Hey man, you have the option to create a script(ex. batch file), for example currently you are connected to your profile1.ovpn then you should execute the below script to connect to profile2.ovpn
And vice-versa when you would like to connect to profile2.ovpn with auto-disconnecting the profile1.ovpn, then run the script below.
Code: Select all
"C:\Program Files\OpenVPN\bin\openvpn-gui.exe" --command disconnect profile1.ovpn
timeout 5 > NUL
"C:\Program Files\OpenVPN\bin\openvpn-gui.exe" --command connect profile2.ovpn
And vice-versa when you would like to connect to profile2.ovpn with auto-disconnecting the profile1.ovpn, then run the script below.
Code: Select all
"C:\Program Files\OpenVPN\bin\openvpn-gui.exe" --command disconnect profile2.ovpn
timeout 5 > NUL
"C:\Program Files\OpenVPN\bin\openvpn-gui.exe" --command connect profile1.ovpn