I have two OpenVPN Servers...which I foolishly set up with separate CA, CERT, KEY, etc. thus requiring separate client config files. I want to implement failover but am very reluctant to rebuild the second server to make it the same as the first - mainly because they are remote...very remote.
So, I've been playing around with the client.conf file on my Raspberry Pi OpenVPN client (Raspbian/Ubuntu) and came across this little tidbit in the OpenVPN manpage:
Certificate authority (CA) file in .pem format, also referred to as the root certificate. This file can have multiple certificates in .pem format, concatenated together.
So, with two "remote" lines in my client.conf, I also put two blocks of <ca>, <cert>, <key>, <tls-auth> in that file. And, well, it seems to work. No matter which server I specify first with the "remote" lines, it connects (after restarting openvpn service, of course).
I haven't tried failover yet as that would require me taking each remote server off-line individually to test (again reluctant to do so since they are so remote).
So, am I fooling myself and this just won't work as a failover client.conf, or have I stumbled onto a lazy solution to my problem?