alexw
I have perhaps a more atypical setup.
- openvpn server A is on a VPS somewhere on the internet
- clients connect to server A and must be able to talk to each other and access each other's services (vnc, ssh, etc)
The above works fine, except that server A sometimes is unreachable. I setup a second openvpn server B and I then setup clients to have
remote server-a.domain.com 1195
remote server-b.domain.com 1195
This also works fine and clients can talk to each other ... but only as long as they all connect to the same server, which doesn't always happen, depending on when server A/B fails and comes back up, on the clients' timeouts etc.
I haven't yet figured out how to setup server A and server B such that clients that connect to server A can talk to clients that connect to server B, but do so transparently such that clients have a single config, agnostic to which server they connect to.
What's the missing ingredient?
Currently both server A and server B have the same configs, including for the local IPs they issue to clients.
proto tcp-server
port 1195
dev tunfoo
topology subnet
push "topology subnet"
mode server
tls-server
ifconfig 10.10.0.1 255.255.255.0
push "route-gateway 10.10.0.1"
route-gateway 10.10.0.1
ifconfig-pool 10.10.0.200 10.10.0.249 255.255.255.0
verb 3
key server-key.pem
ca ca.pem
cert server-cert.pem
dh dh.pem
cipher AES-128-CBC
persist-key
persist-tun
comp-lzo no
push "comp-lzo no"
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 1.1.1.1"
push "dhcp-option DNS 1.0.0.1"
keepalive 15 120
user nobody
group nogroup
client-config-dir clients-foo
client-to-client
ifconfig-push 10.10.0.101 255.255.255.0
client
nobind
dev tundig
remote server-a.domain.com 1195 tcp
remote server-b.domain.com 1195 tcp
comp-lzo no
cipher AES-128-CBC
route-nopull
verb 3
key /etc/openvpn/nuc-key.pem
cert /etc/openvpn/nuc-cert.pem
ca /etc/openvpn/ca.pem