Windows – Use the same port (443) for hosting multiple applications

httpsopenvpntcpwindows

I have a Windows Server. I am hosting multiple websites on port 443 using the Host Header Binding in IIS. This works great, however, I am looking for a solution to somehow be able to use port 443 to run an OpenVPN server on the same windows machine.

Is there some way I can use IIS to bind a vpn.example.com port to 443 and make it route all incoming connections to an internal port, e.g 8080, which will host the OpenVPN application, or does anyone know of a possible application/workaround that will accomplish the same thing?

Best Answer

Not possible.

Making OpenVPN use port 443 is possible and an useful way of bypassing a firewall that has port 443 open. That's because both HTTPS and OpenVPN uses TLS encryption, making it almost* impossible to distinguish one from another.

However, while OpenVPN utilizes the common TLS encryption, it doesn't implement HTTP protocol; the one having the Host: header allowing the name based virtual hosts. Therefore, you'll need another IP address for your OpenVPN server.

(*) Some deep packet inspection may have ability to detect patterns that doesn't match HTTPS.