“In a world where data breaches are common, using a VPN isn’t just an option; it’s a necessity.”
How to Configure VPN on Windows Server 2019
Configuring a VPN (Virtual Private Network) on Windows Server 2019 allows users to securely connect to your organization’s network from remote locations. Here’s a step-by-step guide on how to set up a VPN using the Routing and Remote Access Service (RRAS) on a Windows Server 2019 machine.
Prerequisites
- Windows Server 2019: Ensure you have a Windows Server 2019 machine prepared.
- Administrator Privileges: You need administrative access to configure RRAS.
- Public IP Address: For external access, your server should have a public IP address (or be correctly configured behind a router).
- Firewall Configuration: Ensure necessary ports are opened (PPTP: 1723, L2TP: 500, 1701, 4500, SSTP: 443, IKEv2: 500, 4500).
Step 1: Install Remote Access Role
- Open Server Manager:
Click on the Start menu and select Server Manager.
- Add Roles and Features:
In the Server Manager dashboard, click on Add Roles and Features. Click Next on the “Before you begin” page.
- Select Installation Type:
Choose Role-based or feature-based installation and click Next.
- Select Destination Server:
Choose the local server and click Next.
- Select Server Roles:
Scroll down and check the box for Remote Access. Click Next through the feature selection until you reach the confirmation page. Review your selections and click Install.
- Complete Installation:
Once the installation completes, click Close.
Step 2: Configure RRAS
- Open Routing and Remote Access:
Back in the Server Manager, click on Tools and select Routing and Remote Access.
- Enable Routing and Remote Access:
In the RRAS console, right-click on your server name and select Configure and Enable Routing and Remote Access.
- Configuration Wizard:
Click Next to proceed with the wizard. Choose Custom configuration and click Next. Select the options depending on your needs: For VPN, check VPN and click Next. Click Finish to complete the configuration.
- Start the service:
Right-click on your server name and select Start.
Step 3: Configure VPN Ports
- Ports Configuration:
In RRAS, expand your server name and go to Ports. Right-click on Ports, select Properties. Configure the ports according to the protocol you want to enable (PPTP, L2TP, SSTP, etc.). Ensure enough ports are available as needed.
Step 4: Configure IP Address Assignment
- Configure IP Address Assignment:
Go to your RRAS properties by right-clicking the server name in the RRAS console and selecting Properties. Navigate to the IPv4 tab. Choose either Automatically, via DHCP or Static address pool. If using a static pool, enter the IP range.
Step 5: Configure User Access
- Create User Accounts (if you haven’t already):
Open Active Directory Users and Computers or Computer Management. Create or use existing user accounts that will be allowed to connect to the VPN.
- Set Dial-in Permissions:
Right-click on the user account and select Properties. Go to the Dial-in tab. Set the Network Access Permission to Allow access.
Step 6: Configure Firewall Settings
- Windows Firewall:
Open Windows Defender Firewall with Advanced Security. Create inbound rules to allow traffic on the VPN ports you configured.
- Router Configuration (if applicable):
If your Windows server is behind a router, you need to configure port forwarding for the VPN ports to your server’s IP address.
Step 7: Test the VPN Connection
- Client Configuration:
On the client machine, go to Settings > Network & Internet > VPN. Click on Add a VPN connection. Fill in the connection details, including the VPN provider, connection name, server name, and sign-in information.
- Connect to the VPN:
Attempt to connect to the VPN. Troubleshoot any issues using the RRAS event logs and Windows logs if the connection fails.
Step 8: Optional – Configure Certificate for SSTP
If you choose to use SSTP as your VPN type, you will need to configure an SSL certificate. This usually involves obtaining a certificate from a trusted CA or creating a self-signed certificate (not recommended for production).
Final Notes
- Always make sure your Windows Server is fully updated.
- Regularly monitor your VPN connections for any unauthorized access.
- Consider implementing additional security measures, such as strong authentication methods.
This guide should help you successfully set up a VPN on Windows Server 2019. If you encounter issues, review each configuration setting carefully.