Imagine that you already have some valid SSL certificate (e.g. from Lets Encrypt with auto-renew, check https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-14-04) and want to use it for your Pritun’s web panel.

Just open main app.py file

mcedit /usr/lib/pritunl/lib/python2.7/site-packages/pritunl/app.py

Find next strings (lines number 146-149)

        server_cert_path = os.path.join(settings.conf.temp_path,
            SERVER_CERT_NAME)
        server_key_path = os.path.join(settings.conf.temp_path,
            SERVER_KEY_NAME)

And replace them (or just comment with #) with

    server_cert_path = '/etc/letsencrypt/live/vpn.sergeybelove.ru/cert.pem'
    server_key_path = '/etc/letsencrypt/live/vpn.sergeybelove.ru/privkey.pem'

And that is all.

3324 Total Views 3 Views Today

March 19th, 2016

Posted In: tricks