I'm trying to set up OpenVPN to listen on port 443, and then pass all HTTPS traffic to Apache, by using the
port-share option. Relevant config snippets are:OpenVPN
Apache with SSL
My OpenVPN client connects just fine, but when opening the HTTPS enabled page, I get errors. Firefox says:SSL received a record that exceeded the maximum permissible length.Curl says curl: (35) error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocolThe request ends up on Apache, since I see in the error logs the following messages:
The messages entry for a HTTPS connection is
Using httpd-2.2.3-43.el5.centos and openvpn-2.1.1-2.el5 .What should I do to make port sharing work? Update: Using
and
makes no difference.Update 2 : some command output
|
|||
|
the
port-share option sets the port the other application is listening.What you want to do, is to configure port-share 10443and set Apache to listen on port 10443: Listen <your-public-ip>:10443That's because two applications can't open same port at once. |
||||
| show 2 more comments |
|
OpenVPN's port-share option allows you to
redirect traffic to another HTTPS site , not to a regular web server;
the error you're seeing
occurs when an SSL request is sent to a non-0SSL site. I can reproduce the error by using
(instead of 443)
If you set up your HTTPS site correctly then port-sharing will work. |
from http://serverfault.com/questions/187915/openvpn-port-share-with-apache-ssl
port-share localhost 443. I triedport-share localhost 10443, but it still did not work, same error. – Robert Munteanu Oct 6 '10 at 20:40openvpn --help | grep port-share). And are you sure that apache listens on the configured port and has SSL working? – Hubert Kario Oct 6 '10 at 20:53