SALES: 1-800-867-1380

Routing and Remote Access Service (RRAS) templates

Updated: November 11, 2014

Use this template below as a guideline. In the case of RRAS, it’s best to download the script that is available in the Management Portal. For more information about the script and how to use it, see Site-to-Site VPN in Azure Virtual Network using Windows Server 2012 RRAS.

This is a Windows PowerShell script template to be used as a guideline. Modify the script as necessary to adapt to your own environment.

# Microsoft Corporation
# Windows Azure Virtual Network

# This configuration template applies to Microsoft RRAS running on Windows Server 2012.
# This configuration template configures an IPSec VPN tunnel used to connect your on-premises VPN device with the Windows Azure Virtual Network gateway.

# !!! In this version, the following support restrictions apply for RRAS:
# !!! 1. Only IKEv2 is currently supported
# !!! 2. Only route-based VPN configuration is supported.

# Install RRAS role
Import-Module ServerManager
Install-WindowsFeature RemoteAccess -IncludeManagementTools
Add-WindowsFeature -name Routing -IncludeManagementTools

# !!! NOTE: You may be required to reboot before continuing on with the script.

# Install S2S VPN
Import-Module RemoteAccess
Install-RemoteAccess -VpnType VpnS2S

# Add S2S VPN interface
Add-VpnS2SInterface -Protocol IKEv2 -AuthenticationMethod PSKOnly -NumberOfTries 3 -ResponderAuthenticationMethod PSKOnly -Name <SP_AzureGatewayIpAddress> -Destination <SP_AzureGatewayIpAddress> -IPv4Subnet @("<SP_AzureNetworkCIDR>:<SP_AzureNetworkMetric>") -SharedSecret <SP_PresharedKey>

# Restart the RRAS service
Restart-Service RemoteAccess

# Dial-in to Azure gateway (optional)
#Connect-VpnS2SInterface -Name <SP_AzureGatewayIpAddress> 

Static routing configuration is not supported.

See Also

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2015 Microsoft