导出 (0) 打印
全部展开

路由和远程访问服务模板

更新时间: 2014年4月

下方的模板适用于 Windows Server 2012 路由和远程访问服务。有关所有可用的设备模板的列表,请参见关于用于虚拟网络的 VPN 设备。有关使用路由和远程访问的详细信息,请参见在云中部署远程访问SSTP 远程访问分步指南:部署

这是一个要用作基准的 Windows PowerShell 脚本模板。按需修改脚本以适合您自己的环境。

# 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> 

Important重要提示
不支持静态路由配置。

另请参阅

显示:
© 2014 Microsoft