I am trying to create an OpenVPN server cluster that can autoscale, I have found a lot of information online on how to create such a network.
As far as I understand, you basically use a round-robin DNS, and few OpenVPN servers, the clients simply connect to the DNS and are assigned one of the OpenVPN servers to connect to.
However, my setup requires that all clients will be visible to each other, so I am using the client-to-client
configuration.
If each of the clients will be assigned a random OpenVPN server, they will not be able to communicate with each other, only clients that happened to be on the same exact server will be able to communicate.
How do I scale an OpenVPN cluster that needs client-to-client communication on all clients?
Have some name resolution, or name registration system so that clients on all VPN servers register their name and IP they get assigned, so they can resolve and connect to each other by IP.
Then just make sure you setup routing properly and don't use any NAT on the VPN servers. So if you have 192.168.100.0/24 on VPN, and 192.168.101.0/24, setup IP routing so those two subnets can reach each other.
This would mostly just be a standard site-to-site VPN routing setup which also requires proper routing setup. Just have multiple servers set up.