Create an SSTP VPN Server in Windows Server 2016

I had already created an L2TP VPN server in Windows Server 2016 which worked great with my IOS devices but I found did not work so well with Windows 10.  Therefore I created an SSTP VPN Server to access my devices via my home broadband connection (Sky Fibre).  I found that this works perfectly with all my Windows 10 machines.  The main difference between L2TP and SSTP is that for SSTP we need to use certificates.  We will cover everything you need to get this up and running below.

Firstly build a Windows 2016 server, VM or physical it doesn’t really matter.  I used a VM as I can spin it up/down and snapshot as needed.  For notes on installing Windows 2016 Server please see here.

You then need to setup a Certificate Authority (Can be on the same server).  Please follow this guide for step by step instructions on setting up a CA to use with your SSTP VPN.

You then need to install the Remote Access role.  To do this open Server Manager and start the Add Roles and Features wizard.  Select the Remote Access Role and click Next.

Create an L2TP VPN Server in Windows 2016

Click Next again

Create an L2TP VPN Server in Windows 2016-1

Click Next again

Create an L2TP VPN Server in Windows 2016-2




Click Add Features and click Next

Create an L2TP VPN Server in Windows 2016-3

Click Next

Create an L2TP VPN Server in Windows 2016-4

Accept the Web Server Role service selections and click Next

Create an L2TP VPN Server in Windows 2016-5

Click Install

Create an L2TP VPN Server in Windows 2016-6

Wait for the installation to finish

Create an L2TP VPN Server in Windows 2016-7

Once the role has installed click the Open he Getting Started Wizard option from the server manager

Create an L2TP VPN Server in Windows 2016-8




Select Deploy VPN Only

Create an L2TP VPN Server in Windows 2016-9

You now have access to the Routing and Remote Access console

Create an L2TP VPN Server in Windows 2016-10

Right click on your server name and select Configure and Enable Routing and Remote Access

Create an L2TP VPN Server in Windows 2016-11

Click Next

Create an L2TP VPN Server in Windows 2016-12

If you only have one network interface select Custom configuration and click Next

Create an L2TP VPN Server in Windows 2016-16

Select VPN Access and click Next

Create an L2TP VPN Server in Windows 2016-17.




Click Finish

Create an L2TP VPN Server in Windows 2016-18

Click Start service

Create an L2TP VPN Server in Windows 2016-19

Wait for the service to start

Create an L2TP VPN Server in Windows 2016-20

Right click on your server name and click Properties.  Leave the general tab as it is and click on Security

Create an L2TP VPN Server in Windows 2016-21

Ensure that you only have EAP and MS-CHAP v2 selected

Create an L2TP VPN Server in Windows 2016-22

We now need to issue a certificate to the VPN server to enable it to trust incoming SSTP connections.  To do this (on the VPN server) click Start>Type certlm.msc to open the local machine certificate mmc.

Create an SSTP VPN Server in Windows Server 2016

Right click on Certificates under Personal and click All Tasks>Advanced Operations>Create Custom Request

Create an SSTP VPN Server in Windows Server 2016-1




Click Next and Next again

Create an SSTP VPN Server in Windows Server 2016-2

Accept the defaults and click Next

Create an SSTP VPN Server in Windows Server 2016-3

Expand Details> Click Properties and enter the Friendly name as the VPN server’s external DNS name.  If you do not have one you can setup DuckDNS which is a free service as i did.  Then click the Subject tab

Create an SSTP VPN Server in Windows Server 2016-9

Add both the Common Name and DNS names as the VPN server’s external DNS name.  Then click the Extensions tab

Create an SSTP VPN Server in Windows Server 2016-10

Expand Extended Key Usage and add Client Authentication and Server Authentication, then click Ok and Next

Create an SSTP VPN Server in Windows Server 2016-15

Choose somewhere to save the certificate request and click Finish

Create an SSTP VPN Server in Windows Server 2016-7

Open the Certificate Authority mmc and right click on the server name.  Then go to All Tasks> Submit new request.  Open the request file that you just saved.

Create an SSTP VPN Server in Windows Server 2016-8

Click Pending Requests and you should see your certificate request in there.  Right click on it and click Issue

Create an SSTP VPN Server in Windows Server 2016-11

You can now go to issued certificates and double click on your issued certificate.  Click on the details tab and then click Copy to File

Create an SSTP VPN Server in Windows Server 2016-12

Accept the defaults and click Next.  Then save the certificate and click Finish

Create an SSTP VPN Server in Windows Server 2016-13

Open the certlm.msc snap-in again and right click on Certificates under personal.  Click import and import the certificate you just exported from the Certificate Authority console

Create an SSTP VPN Server in Windows Server 2016-14




Then go back to the Routing and Remote Access console properties and click the security tab.  Under SSL Certificate Binding select the certificate that you just created

Create an SSTP VPN Server in Windows Server 2016-16

 

Click the IPv4 tab and select Static address pool.  Enter a range of addresses to use for DHCP when on the VPN.

Create an L2TP VPN Server in Windows 2016-24

Select the Logging tab and check the Log additional Routing and Remote Access information box

Create an L2TP VPN Server in Windows 2016-25

Click OK and you will be prompted to restart the Routing and Remote Access Service, do this now.

Create an L2TP VPN Server in Windows 2016-26

Next we need to create a secure user account to access the VPN.  Click Start>Run and type compmgmt.msc to access computer management.  Right click on Users and click New User.  Give the user a name and a strong password.

Create an L2TP VPN Server in Windows 2016-27

Right click on the user account and click Properties.  Click the Dial-in tab and select Allow access, then click OK.  If you want to use NPS to control access at this point select Control access through NPS Network Policy.

Create an L2TP VPN Server in Windows 2016-28

As I do not have a fixed external IP address for this server and am sitting behind a NAT firewall (Provided by my broadband supplier Sky – which I can’t change) I will need to forward ports from my router to the RRAS VPN server.  To do this you will need to set up something like the below:

Create an SSTP VPN Server in Windows Server 2016-17

If you are forwarding all port 443 traffic to this server you may want to restrict access to IIS.  You can do this by opening IIS Manager and selecting the default website.  You can then click on IP Address and Domain Restrictions.

Create an SSTP VPN Server in Windows Server 2016-23

You can then add a Deny rule.  I added 0.0.0.0 (0.0.0.0) as I wanted to restrict all access to IIS.

Create an SSTP VPN Server in Windows Server 2016-24




Next, export the root certificate from your certificate authority by opening the CA console, right clicking on the server name and going to Properties.  Click the General tab and View Certificate.  Then click details and export the certificate to a file.

Create an SSTP VPN Server in Windows Server 2016-18

Import this to Windows 10 machine in the certlm.msc snap-in but add it to Certifiates under Trusted Root Certification Authorities.

Next you need to create a certificate request on your Windows 10 machine.

To do this (on the Windows 10 client) click Start>Type certlm.msc to open the local machine certificate mmc.

Create an SSTP VPN Server in Windows Server 2016

Right click on Certificates under Personal and click All Tasks>Advanced Operations>Create Custom Request

Create an SSTP VPN Server in Windows Server 2016-1

Click Next and Next again

Create an SSTP VPN Server in Windows Server 2016-2

Accept the defaults and click Next

Create an SSTP VPN Server in Windows Server 2016-3

Expand Details> Click Properties and enter the Friendly name as the Windows 10 machine’s name.   Then click the Subject tab

Create an SSTP VPN Server in Windows Server 2016-19

Add both the Common Name and DNS names as the VPN server’s external DNS name.  Then click the Extensions tab

Create an SSTP VPN Server in Windows Server 2016-20

Expand Extended Key Usage and add Client Authentication then click Ok and Next

Create an SSTP VPN Server in Windows Server 2016-6

Choose somewhere to save the certificate request and click Finish

Create an SSTP VPN Server in Windows Server 2016-7




Open the Certificate Authority mmc and right click on the server name.  Then go to All Tasks> Submit new request.  Open the request file that you just saved.

Create an SSTP VPN Server in Windows Server 2016-8

Click Pending Requests and you should see your certificate request in there.  Right click on it and click Issue

Create an SSTP VPN Server in Windows Server 2016-11

You can now go to issued certificates and double click on your issued certificate.  Click on the details tab and then click Copy to File

Create an SSTP VPN Server in Windows Server 2016-12

Accept the defaults and click Next.  Then save the certificate and click Finish

Create an SSTP VPN Server in Windows Server 2016-13

Open the certlm.msc snap-in again on the Windows 10 client and right click on Certificates under personal.  Click import and import the certificate you just exported from the Certificate Authority console

Create an SSTP VPN Server in Windows Server 2016-14

In Windows 10 click Settings> Network & Internet> VPN and click add a VPN connection.  Select Windows (built-in) as the VPN provider and give the connection a name of your choosing.  Enter the external DNS name of your VPN server and choose the VPN type as SSTP.

You can then enter the credentials of the VPN user account that we created earlier, then save the connection.

Create an SSTP VPN Server in Windows Server 2016-21

Next open the regedit and go to the below key:

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Sstpsvc\Parameters

Add a DWORD called NoCertRevocationCheck and set it to a value of 1

It should now connect without any issues.

Create an SSTP VPN Server in Windows Server 2016-22




9 Replies to “Create an SSTP VPN Server in Windows Server 2016”

  1. hello,

    on my windows 7 didn’t connect can you help ?
    show me error when make connect from my windows 7

  2. I get error : A certificate chain processed, but terminated in a root certificate which is not trusted by the trust provider.

    cant seem to fix it .

    1. You need to use a 3rd party trusted cert and import it into RRAS. That is the best way. Using a certificate authority, requires that all the issued certificates be imported in to each users certificate store. Using a 3rd party trusted CA issued cert, prevents this problem. SAN certs are so cheap now, or a wildcard will work as well.

    2. If an internal CA is in your certificate chain and not on the workstation you’re connecting with, you will need to install that certificate in the Trusted Root Certificate store.

      My guess is you’re not using a domain-joined computer for testing otherwise the CA would already be a trusted root CA. Either way, this should fix your issue.

  3. Hi, when i issue and export the client certificate, the expiration is only one year, there is the possibility to have the certificate issued more than one year expiration?
    Thanks
    Andrea

  4. Thank you for the concise details. I want to ask, following this setup will the VPN client machine automatically us the internet service on the VPN server or is there a further setup for this to happen?

  5. Good afternoon friend. Thanks for the tutorial.
    I noticed that just importing the CA to my client machine I can access it. Are these steps for creating a unique certificate for the customer really necessary?

Leave a Reply

Your email address will not be published. Required fields are marked *