# load balance your vpn servers

worker_processes  2;
error_log  logs/error.log;

events {
  worker_connections  16384;
}

# http {
#   ... your usual http block ...
# } # http end

stream {
  error_log  logs/stream_error_openvpn.log;

  upstream backend {
    hash $remote_addr consistent;
    server 192.168.99.3:8443;
    server 192.168.99.4:8443;
    server 192.168.99.5:8443;
  }

  server {
    listen 443 so_keepalive=on;
    proxy_connect_timeout 300s;
    proxy_timeout 300s;
    proxy_pass backend;
  }

}
