Page 1 of 1

How to track the current remote endpoint IP

Posted: Wed Feb 15, 2017 2:32 am
by archimede.pitagorico
I have a VPN client configured so that it connects randomly to a pool of possible UDP VPN servers, and, if connection drops, automatically reconnect perhaps to a different server.

I would like to track which is the selected IP of the end point.

I can think of two ways of doing that:
1) Monitor the log and grep for messages starting with "UDP link"
2) setting up a management interface and activate "state on"

Is there a more elegant way to do that, like telling openvpn to call a certain script every time the remote end point changes?

Re: How to track the current remote endpoint IP

Posted: Wed Feb 15, 2017 2:39 am
by TinCanTech
You mean your client ?

Re: How to track the current remote endpoint IP

Posted: Wed Feb 15, 2017 3:45 am
by archimede.pitagorico
Yes, I would like to know what is the IP of the endpoint my client is currently connecting to, and be notified if the endpoint IP changes.

Re: How to track the current remote endpoint IP

Posted: Wed Feb 15, 2017 6:16 am
by archimede.pitagorico
Perhaps I misunderstood the question: it is not my own VPN client implementation, with "I have a VPN client" I mean "I have an instance of openvpn running on my linux machine".

Re: How to track the current remote endpoint IP

Posted: Wed Feb 15, 2017 11:59 am
by TinCanTech
Try one of the script hooks.