Welcome! Log In Create A New Profile

Advanced

Forwarding from NGINX to OpenVPN

Posted by xplod 
Forwarding from NGINX to OpenVPN
July 22, 2012 06:24AM
Hi.

I've got a question regarding forwarding encrypted content (openvpn) to the specific application.
Previously, I used Ubuntu 10.04 with Plesk 9, where I edited the configuration so that openvpn was listening on the port 443 and forwarded https requests to apache. So I was able to access my server securly even from open WLANs and company internet connections.

Now I updated to Ubuntu 12.04 with plesk 11, where NGINX is placed first in the chain, and forwards https and http requests to apache if needed.
I would prefere to simply add an openvpn.conf file to /etc/nginx/conf.d which tells nginx to forward everything send to openvpn.domain.de:443 to the openvpn server listening on 11194.

I tried to use the following config:
----------------------------------------------------------
server {
listen 81.169.152.68:443;
server_name openvpn.domain.de;

location / {
proxy_pass http://127.0.0.1:11194;
}
----------------------------------------------------------

But all I get is the error message
[error] 31902#0: *1 no "ssl_certificate" is defined in server listening on SSL port while SSL handshaking,
in /var/log/nginx/error.log

If I use this:
----------------------------------------------------------
server {
listen 81.169.152.68;
server_name openvpn.domain.de;
ssl off;

location / {
proxy_pass http://127.0.0.1:11194;
}
----------------------------------------------------------
I get cryptical messages in access.log:
"\x00\x0E8\xE9\xAD\x1B<\xBF\xAA\xD7\x5C\x00\x00\x00\x00\x00" 400 166 "-" "-"

Is it possible to forward all incoming traffic to openvpn directly?

Best regards,
Dirk
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 201
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready