Created
April 23, 2016 19:28
-
-
Save mkubenka/109d853cee9556fa37cbc55958a2c3d5 to your computer and use it in GitHub Desktop.
OpenVPN Access Server Letsencrypt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
apt-get -y install git bc | |
git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt | |
mkdir /etc/letsencrypt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# https://www.sideras.net/lets-encrypt-https-certificates-for-openvpn-as-access-server/ | |
DOMAIN="vpn.server.com" | |
set -eu | |
/etc/init.d/openvpnas stop | |
/opt/letsencrypt/letsencrypt-auto certonly -c /etc/letsencrypt/vpn.server.com.ini | |
/usr/local/openvpn_as/scripts/confdba -mk cs.ca_bundle -v "`cat /etc/letsencrypt/live/$DOMAIN/fullchain.pem`" | |
/usr/local/openvpn_as/scripts/confdba -mk cs.priv_key -v "`cat /etc/letsencrypt/live/$DOMAIN/privkey.pem`" > /dev/null | |
/usr/local/openvpn_as/scripts/confdba -mk cs.cert -v "`cat /etc/letsencrypt/live/$DOMAIN/cert.pem`" | |
/etc/init.d/openvpnas start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rsa-key-size = 2048 | |
email = [email protected] | |
domains = vpn.server.com | |
authenticator = standalone | |
standalone-supported-challenges = tls-sni-01 | |
agree-tos = True | |
keep-until-expiring = True |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment