Windows Server Routing and Remote Access Service (RRAS) is popular for Always On VPN deployments because it supports the Secure Socket Tunneling Protocol (SSTP). The SSTP VPN protocol is recommended for use with the Always On VPN user tunnel because it is firewall friendly. Installing a TLS certificate on the VPN server is necessary to support SSTP VPN connections. Administrators should use a TLS certificate signed by a public certification authority (CA) for optimal reliability and performance.
Click here to view a video demonstration of the procedures outlined in this article.
Certificate Expiration
Of course, all certificates expire, and the TLS certificate used for SSTP is no exception. When using a public TLS certificate, the certificate lifetime is typically no more than one year, which means Always On VPN administrators will be renewing this certificate regularly.
Certificate Renewal
The process of “renewing” an SSTP TLS certificate is essentially the same as installing a new one, as it is best to create a new public/private key pair when renewing a certificate. The following outlines the steps required to generate a Certificate Signing Request (CSR), import the certificate, then assign the certificate to the SSTP listener on the VPN server.
Note: The guidance provided here assumes using an ECC certificate, which is best for optimal security and performance. More details here.
Certificate Request
Open the local computer certificate store (certlm.msc) on the VPN server and perform the following steps to generate a new CSR.
- Expand Certificates – Local Computer > Personal.
- Right-click the Certificates folder and choose All Tasks > Advanced Operations > Create Custom Request.
- Click Next.
- Highlight Proceed without enrollment policy.
- Click Next.
- Select (No template) CNG key from the Template drop-down list.
- Select PKCS #10 in the Request format section.
- Click Next.
- Click on the down arrow next to Details.
- Click on the Properties button.
- Select the General tab.
- Enter the public hostname for the certificate in the Friendly name field.
- Select the Subject tab.
- Select Common name from the Type drop-down list in the Subject name section.
- Enter the public hostname for the certificate in the Value field.
- Click Add.
- In the Alternative name section, select DNS from the Type drop-down list.
- Enter the public hostname for the certificate in the Value field.
- Click Add.
- Select the Extensions tab.
- Expand the Extended Key Usage section.
- Select Server Authentication from the Available options section.
- Click Add.
- Select the Private Key tab.
- Expand the Cryptographic Service Provider section.
- Uncheck the box next to RSA,Microsoft Software Key Storage Provider.
- Check the box next to ECDSA_P256,Microsoft Software Key Storage Provider.
- Expand the Key options section.
- Check the box next to Make private key exportable.
- Check the box next to Make private key exportable.
- Expand the Cryptographic Service Provider section.
- Click Ok.
- Click Next.
- Enter a name for the file in the File Name field.
- Select Base 64 in the File format section.
- Click Finish.
Import Certificate
Once complete, submit the file created to a public CA for signing. When the CA returns the signed certificate, perform the following steps to import it to the local compute certificate store.
- Right-click the Certificates folder and choose All Tasks > Import.
- Click Next.
- Enter the name of the certificate file returned by the public CA in the File name field.
- Click Next.
- Select Place all certificates in the following store and ensure that Personal is listed in the Certificate store field.
- Click Next.
- Click Finish.
- Click Ok.
Assign Certificate
After importing the new TLS certificate in the local computer’s certificate store, open the Routing and Remote Access management console (rrasmgmt.msc) and perform the following steps to assign the TLS certificate to the SSTP listener.
- Right-click the VPN server and choose Properties.
- Select the Security tab.
- Select the new TLS certificate from the Certificate drop-down list in the SSL Certificate Binding section. When replacing an existing certificate, you may see a certificate with the same name more than once. Click the View button and ensure the new certificate is selected.
- Click Ok.
- Click Yes to restart the RemoteAccess service.
Demonstration Video
A recorded video demonstration of this process can be found here. The video recording also includes guidance for making these changes on Windows Server Core servers.
Additional Information
Installing or Renewing an SSL/TLS Certificate on Windows Server for Always On VPN and SSTP.
Microsoft Windows Always On VPN SSTP Security Configuration
Microsoft Windows Always On VPN SSL Certificate Requirements for SSTP
Microsoft Windows Always On VPN ECDSA TLS Certificate Request for SSTP
Microsoft Windows Always On VPN SSTP with Let’s Encrypt Certificates