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

How to customize and extend your OpenVPN installation.

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

Post Reply
povpn
OpenVpn Newbie
Posts: 1
Joined: Sun Mar 15, 2015 8:17 am

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

Post by povpn » Sun Mar 15, 2015 8:32 am

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?

Post Reply