Page 1 of 1

How do I query what server I am connected to and change it?

Posted: Sun Mar 15, 2015 8:32 am
by povpn
I have installed OpenVPN on my Windows machine and can successfully connect to the various servers of my VPN provider, privateinternetaccess.com

I want to be able to switch servers using a script.

When called, the script needs to:
1) Query OpenVPN to find out what server it is connected to (if any).
2a) If server is correct then: do nothing.
2b) If server is not correct or not connected to a server then: connect to correct server.

I have tried the telnet management interface, but I can't find a commend that does what I want.

How can I send commands to OpenVPN to query what server (if any) I am connected to?
How can I send commands to OpenVPN to change servers?