You are not logged in.
Aloha,
I am not sure if this is the right section to post this question into, excuse me if it is not
.
I wanted to ask if it is possble to let OpenVPN ping a couple of server, that I added to a list, and then automatically connect to the best one. I hoped I could set it up to just pick the fastest one upon clicking "connect".
<3 Belph
Last edited by Belph (2018-05-26 14:58:44)
Offline
connect to the best one
Define "best". Lowest ping? Fastest throughput? Prettiest rack-mount case?
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
Belph wrote:connect to the best one
Define "best". Lowest ping? Fastest throughput? Prettiest rack-mount case?
Prettiest rack-mount case would be the best, I think.
Nah for real, fastest ofc. I hoped OpenVPN is able to ping several server I put in a list and pick the fastest one out of this list.
Offline
OpenVPN doesn't have anything to do this; it will just round-robin multiple servers in the config file.
You could have a script that attempts to identify the server with lowest ping then connect to that. Something like this:
fping -c3 -q archlinux.org ubuntu.org kernel.org 2>&1 | sort -t/ -k8 -n | head -n1 | cut -d' ' -f1fping will send 3 pings (-c3) to each host and out only the summary (-q) which includes the average RTT. We then sort by column 8, delimited by a forward-slash character. Then take the top line (`head`) which has the lowest RTT, and cut down to just the hostname/IP address (`cut`).
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline