nginxreverse-proxyhaproxyopenvpn

Reverse proxy OpenVpn using Haproxy or Nginx


i was wondering how it is possible to reverse proxying an openvpn connection using the SNI, i've read so much about that: HERE and HERE

I've tried any kind of solution, using haproxy and using nginx, but it seems that my client (i've tried Tunnelblick and a simple openvpn client on linux) does not send the SNI information

Basically, this is the result that i want to achieve:

vpn1.app.com ─┬─► *.app.com dns -> nginx at my public ip ─┬─► vpn1 at 10.0.0.3

vpn2.app.com ─┤                                           ├─► vpn2 at 10.0.0.4

vpn3.app.com ─┘                                           └─► vpn3 at 10.0.0.5

Any thoughts?


Solution

  • [UPDATE] I've searched for all these days and looked around for a solution, but, in conclusion, it seems that OpenVpn, in it's architecture, isn't sending around to the server the SNI indication, so, no chance to do that.

    I'll use the classic old-school way: NAT and a proper public dns to manage them.