Connect with us

Hi, what are you looking for?


How to install a VPN on Windows Server 2012 R2

How to install a VPN on Windows Server 2012 R2


This post shows you how you can install VPN server on Windows Server 2012 R2 step by step. It shows you how you can easily set up a VPN server from a small environment or for a hosted server scenario.

This is definitely not a guide to enterprise publication, if you are considering an enterprise publication then you should definitely take a look at Direct Access.

I’ve already made a similar post on Windows Server 2008 R2 and Windows Server 2012.

First install “remote accessVia Server Manager or Windows PowerShell.

Locate “Direct Access and VPN (RAS)” role services.

In the following steps only use the default settings. After that you can look at the overview screen and install the role.

After you install the features, which may take some time to finish, you see the Startup Wizard link. Click “Open the Getting Started Wizard“.

This opens a new wizard that will help you configure the server. On the first screen, select “Post VPN only“.

This opens the MMC for Routing and Remote Access

Right click on the server name and click on β€œConfigure and enable Routing and Remote Access“.

In the new wizard, select “custom configuration“.

Choose “VPN access“.

After clicking Finish, you can now start the Routing and Remote Access service.

If you have another firewall between the Internet and your Windows server, you must open the following firewall port, and forward it to your Windows server:

For PPTP: 1723 TCP and Protocol 47 GRE (also known as PPTP Pass-through)
For L2TP over IPSEC: 1701 TCP and 500 UDP
For SSTP: 443 TCP

After installation, users must be enabled for remote access to connect to your VPN server. On a stand-alone server this can be done in Computer Management MMC, in a domain environment this can be done in the user properties of an Active Directory user.

If you do not have a DHCP server in your environment, you must add a static IP address group. This is often required if you have only one server hosted with your service provider. In the properties of your VPN server, you can click on the IPv4 tab and enable and configure the Static Address Pool.

Now you must add an IP address from the same subnet as the set of static addresses to the network interface of your server, so that users can access the server.

I hope this helps you to setup a VPN server in a small, lab or hosted server environment.

Tags: GRE, HowTo, L2TP, Microsoft, PPTP, RAS, Remote Access, setup, SSTP, VPN, VPN Server, Windows Server, Windows Server 2012 R2 was last modified: April 25, 2019

About the author / Thomas Maurer

Thomas works as a senior advocate for the cloud at Microsoft. He interacts with the community and customers around the world to share his knowledge and gather feedback to improve the Azure cloud platform. Prior to joining the Azure engineering team, Thomas was a Principal Architect and Microsoft MVP, helping to design, implement, and enhance Microsoft’s cloud technology. If you want to know more about Thomas, check out his blog: and Twitter:

December 21, 2021 β€’ Microsoft Azure

I know many of you want to know more about Azure Arc and how you can take advantage of the Azure Hybrid management and control level and…

Read more β†’

Don’t forget to share this post with friends !

Click to comment

Leave a Reply

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



AnyConnect certificate-based authentication. Cisco community πŸ‘¨β€πŸ’» The information in this document is based on the following software and hardware versions: ASA 5510 running software...


AnyConnect: Install a self-signed certificate as a trusted source πŸ‘¨β€πŸ’» kmgmt-2879-cbs-220-config-security-port objective The goal of this article is to walk you through creating and...


ITProPortal . Portal πŸ‘¨β€πŸ’» We live in a dynamic moment in terms of technology. Even criminals are becoming more technically savvy and are using...


Top 5 Free AV Packages – πŸ‘Œ Bitdefender Antivirus Free Edition best interface Positives Works on Windows 7 and 8.1 Very easy to use...