Traffic wroteatlantun wroteQ1:
I assume when the client tries to connect, it would try a random A entry and not stick with the first entry.
Are these a valid assumptions?
No .. See
--remote-random in
The Manual v23x.
I understand that remote-random will make the client pick a random connection from the available connections
but that means I have to list all the connections in the client config -- something like :
remote-random
remote 10.10.10.1 1194
remote 10.10.10.2 1194
remote 10.10.10.2 1194
etc..
I have tested this and it works well
also when 1 connection fails or is killed or server goes down it move to the next one (with or without random ) and client is guaranteed to always be connected to 1 of servers.
this redundancy works well with this pattern
my problem is that the list of vpn servers is really dynamic ( due to auto-scaling rules - based on traffic)
so listing the IPs in the client config is no option as this changes all the time
so waht I would like to achieve is have client config contain 1 connection defined by its domain name
remote myvpn.example.com 1194
and because myvpn.example.com DNS entries
10.10.10.1 A record
10.10.10.2 A record
10.10.10.2 A record
if the client will always pick the first A record, all client will end up going to 1 server and the others will be un-utilized
I read the following
--remote host; If host is a DNS name which resolves to multiple IP addresses, the first address returned by the system getaddrinfo() function will be used (no DNS randomization inside OpenVPN 2.3.x, and it will not try multiple addresses).
does it mean what I'm trying to achieve is not possible?