Client Disconnect command line on Windows
Posted: Mon Jul 08, 2013 6:23 pm
I have a problem to find a command line to disconnect et close application.
System : windows server 2008 r2 64
openvpn client version : 2.3.1 x86_64-w64-mingw32
my file .ovpn :
==============================
tls-client
client
dev tun
proto udp
tun-mtu 1400
remote **ip** **port**
pkcs12 **file**.p12
cipher BF-CBC
verb 3
ns-cert-type server
script-security 3
askpass password.txt
==============================
First I connect with this command line :
"C:\Program Files\OpenVPN\bin\openvpn-gui.exe" --connect **config**.ovpn
It's ok and I don't need to write the password. Just I have a problem with UAC again but I'll check this later.
The file "password.txt" is the same directory than the .ovpn et have just one line with the password.
I would pass the password in the command line but I have not been able.
I need to connect then disconnect automatic the night with a ETL (Microsoft SSIS) so I need a command line.
So now I need the command line for disconnect then close, but impossible to find.
Here we talk about a signal SIGTERM and command exit or quit but I'm not able to use them : http://openvpn.net/index.php/open-sourc ... ml#control
I have read too the pages below but no solution is ok
http://openvpn.net/index.php/open-sourc ... rface.html
https://community.openvpn.net/openvpn/w ... n23ManPage
I don't understand, sometimes I can use just "openvpn --version" for example et to connect I have to use "openvpn-gui.exe --connect ..." In my case, I don't need gui.
Many people have these problems but there is no solution on the post.
So, if someone knows how to do, thanks a lot.
p.s : sorry for my traduction if there is mistakes
System : windows server 2008 r2 64
openvpn client version : 2.3.1 x86_64-w64-mingw32
my file .ovpn :
==============================
tls-client
client
dev tun
proto udp
tun-mtu 1400
remote **ip** **port**
pkcs12 **file**.p12
cipher BF-CBC
verb 3
ns-cert-type server
script-security 3
askpass password.txt
==============================
First I connect with this command line :
"C:\Program Files\OpenVPN\bin\openvpn-gui.exe" --connect **config**.ovpn
It's ok and I don't need to write the password. Just I have a problem with UAC again but I'll check this later.
The file "password.txt" is the same directory than the .ovpn et have just one line with the password.
I would pass the password in the command line but I have not been able.
I need to connect then disconnect automatic the night with a ETL (Microsoft SSIS) so I need a command line.
So now I need the command line for disconnect then close, but impossible to find.
Here we talk about a signal SIGTERM and command exit or quit but I'm not able to use them : http://openvpn.net/index.php/open-sourc ... ml#control
I have read too the pages below but no solution is ok
http://openvpn.net/index.php/open-sourc ... rface.html
https://community.openvpn.net/openvpn/w ... n23ManPage
I don't understand, sometimes I can use just "openvpn --version" for example et to connect I have to use "openvpn-gui.exe --connect ..." In my case, I don't need gui.
Many people have these problems but there is no solution on the post.
So, if someone knows how to do, thanks a lot.
p.s : sorry for my traduction if there is mistakes