I am wondering if it is possible to redirect requests through Apache to eg. OpenVPN.
As long as I need to bypass firewall, I need to use port 80/443 for openVPN, but there is Apache server which has both port for itself.
Client ---> Firewall (allows 80/443 only) --->| ---> Apache (80/443) ---> OpenVPN (1194) |
--------------------------------------------
My Server
I was thinking about mod_proxy, but I am not sure if it is good idea, have you got any ideas?
I hope possible solution will be applicable on virtual host as well.
I used
sslh
. It works just great.The issue - sharing ports - could be solved in the opposite direction, by making Apache listen on port, say, 10443 and forwarding requests from OpenVPN there with the port-share option. (via)
You can not use the same port for multiple services. So, you can keep apache running on one port 80 or 443 but not both. The other port can be used to forward requests to the openvpn server.
You can try port forwarding using SSH. Have a look at this link. You can forward the port 80 on the server to openVPN port. Of course, you need to change the port used by the openvpn client.
The simplest solution would be to get a second ip on the server and have OpenVPN listen to port 443 on that ip.
Don't forget, mod_proxy is for HTTP and HTTPS requests, and OpenVPN doesn't support either protocol as a transport.
Corkscrew will allow you to tunnel SSH over an SSL proxy. It could be used in conjunction with the SSH port forwarding that Khaled mentioned if getting an extra ip isn't an option.
The httptunnel package should help solve your problem. Source is available at ftp://ftp.gnu.org/pub/httptunnel
On the server:
You will need to set up a vhost with mod_proxy to port 8888
On the client: