Howto completely disable OpenVPN client auto connect

This forum is for all inquiries relating to the installation of OpenVPN from source and with binaries.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please visit (and READ) the OpenVPN HowTo http://openvpn.net/howto prior to asking any questions in here!
Post Reply
aboka
OpenVPN User
Posts: 27
Joined: Thu Jul 02, 2020 10:28 am

Howto completely disable OpenVPN client auto connect

Post by aboka » Fri Jul 10, 2020 1:01 pm

hi, im using Softether(v4.34-9745-beta-2020.04.05-linux-x64-64bit) as the server on a Ubuntu 20.04 TLS and using OpenVPN client(v11.15) on a Windows 7 64bit laptop

I would like to ask how could we disable the auto-connect option? i disconnect the connection, then close the lid of the laptop, and when i opens up, it will connect to the vpn by itself.

i hv search online and someone mention setting this value on the client config - 'connect-retry-max n', so will this solve my issue? and if yes, what value should i give to 'n'?
Client config

dev tun
proto udp
remote vpn619393904.softether.net 1194
cipher AES-128-CBC
auth SHA1
resolv-retry infinite #resolve dns
nobind
persist-key
persist-tun
client
verb 3
auth-user-pass

p/s - hv read about using 3rd party program to fix this, but would prefer not as dont want install anything and make it as easy as possible

Thank you,
Last edited by Pippin on Fri Jul 10, 2020 1:20 pm, edited 1 time in total.
Reason: Formatting

TinCanTech
OpenVPN Protagonist
Posts: 11139
Joined: Fri Jun 03, 2016 1:17 pm

Re: Howto completely disable OpenVPN client auto connect

Post by TinCanTech » Fri Jul 10, 2020 1:29 pm

aboka wrote:
Fri Jul 10, 2020 1:01 pm
using OpenVPN client(v11.15) on a Windows 7 64bit laptop
You mean the Windows GUI ?
https://community.openvpn.net/openvpn/w ... PN-GUI-New

aboka
OpenVPN User
Posts: 27
Joined: Thu Jul 02, 2020 10:28 am

Re: Howto completely disable OpenVPN client auto connect

Post by aboka » Fri Jul 10, 2020 1:58 pm

TinCanTech wrote:
Fri Jul 10, 2020 1:29 pm
aboka wrote:
Fri Jul 10, 2020 1:01 pm
using OpenVPN client(v11.15) on a Windows 7 64bit laptop
You mean the Windows GUI ?
https://community.openvpn.net/openvpn/w ... PN-GUI-New
hi yes, im referring to the Windows GUI client. hv browse thru the links, but what specifically i should look for? the nearest i notice is 'Launch on windows startup', does that include my situation. will try in awhile. hopefully not as that the client should start together when system starts, just not connect by itself

p/s - i just check and the option is already Off

thank you,

TinCanTech
OpenVPN Protagonist
Posts: 11139
Joined: Fri Jun 03, 2016 1:17 pm

Re: Howto completely disable OpenVPN client auto connect

Post by TinCanTech » Fri Jul 10, 2020 3:30 pm

Then you are using the legacy Windows service to start your VPN ..

aboka
OpenVPN User
Posts: 27
Joined: Thu Jul 02, 2020 10:28 am

Re: Howto completely disable OpenVPN client auto connect

Post by aboka » Fri Jul 10, 2020 3:43 pm

TinCanTech wrote:
Fri Jul 10, 2020 3:30 pm
Then you are using the legacy Windows service to start your VPN ..
will look into the legacy service thing tomorrow. i notice the auto-connect thing do not happen all the time. will update you soon. thanks.

aboka
OpenVPN User
Posts: 27
Joined: Thu Jul 02, 2020 10:28 am

Re: Howto completely disable OpenVPN client auto connect

Post by aboka » Sun Jul 12, 2020 1:22 pm

@TinCanTech sorry late reply as not feeling too well this few days. Ok, hv check and both the OpenVPNService and OpenVPNServiceLegacy is disabled all the while. The only enable service is OpenVPNServiceInteractive.

Tried few times to replicate the issue - disconnect and close the lid. then wait awhile then open the lid again. But it wont auto-connect itself. So the verdict now is either its a 'random bug' or its not a bug but i hv forgot to disconnect before closing the lid, so it will auto connect when the pc comes out from its sleep :p

will post back if theres any update on this. hopefully not.

Thanks for your help :)

TinCanTech
OpenVPN Protagonist
Posts: 11139
Joined: Fri Jun 03, 2016 1:17 pm

Re: Howto completely disable OpenVPN client auto connect

Post by TinCanTech » Sun Jul 12, 2020 3:31 pm

The new GUI is supposed to be a lot better at supporting sleep/hibernate etc..

Basically, only ever use the Interactive service, unless you have a really specific need.

Post Reply