Table of Contents

Let's Encrypt TLS Certificate

softEtherVPN server creates a self-signed TLS certificate during the installation process, but we will use Let’s Encrypt certificate. The advantage of using Let’s Encrypt certificate is that it’s free, easier to set up, and trusted by VPN client software.

sudo apt install certbot
certbot --version

Standalone Plugin

 sudo certbot certonly --standalone --preferred-challenges http --agree-tos --key-type rsa --email you@yourdomain.com -d vpn.yourdomain.com

Using webroot Plugin

sudo nano /etc/apache2/sites-available/vpn.example.com.conf
sudo ln -s /etc/apache2/sites-available/vpn.example.com.conf /etc/apache2/sites-enable/vpn.example.com.conf
<VirtualHost *:80>        
    ServerName vpn.example.com
    DocumentRoot /var/www/vpn.example.com
    <Directory /var/www/vpn.example.com>
       Options Indexes FollowSymLinks
       AllowOverride All
       Require all granted
    </Directory>
</VirtualHost>
sudo mkdir /var/www/vpn.example.com
sudo chown -R www-data:www-data /var/www/vpn.example.com
sudo a2ensite vpn.example.com
sudo systemctl reload apache2
sudo certbot certonly --webroot --agree-tos --key-type rsa --email you@exmaple.com -d vpn.example.com -w /var/www/html

Install The Certificate on SoftEther VPN Server

sudo /opt/softether/vpncmd 127.0.0.1:5555
ServerCertSet
/etc/letsencrypt/live/vpn.yourdomain.com/fullchain.pem
/etc/letsencrypt/live/vpn.yourdomain.com/privkey.pem
exit
sudo systemctl restart softether-vpnserver