Skip to content

Commit 575b318

Browse files
authored
Merge pull request #212044 from DevOpsStyle/vpn-tunneing-type
Vpn tunneling type
2 parents e34baeb + e168279 commit 575b318

File tree

1 file changed

+26
-9
lines changed

1 file changed

+26
-9
lines changed

articles/vpn-gateway/vpn-gateway-forced-tunneling-rm.md

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,14 @@ Forced tunneling lets you redirect or "force" all Internet-bound traffic back to
1717

1818
Forced tunneling can be configured by using Azure PowerShell. It can't be configured using the Azure portal. This article helps you configure forced tunneling for virtual networks created using the [Resource Manager deployment model](../azure-resource-manager/management/deployment-models.md). If you want to configure forced tunneling for the classic deployment model, see [Forced tunneling - classic](vpn-gateway-about-forced-tunneling.md).
1919

20-
## About forced tunneling
21-
20+
## About forced tunneling and splitted tunneling
2221
The following diagram illustrates how forced tunneling works.
2322

2423
:::image type="content" source="./media/vpn-gateway-forced-tunneling-rm/forced-tunnel.png" alt-text="Diagram shows forced tunneling.":::
2524

26-
In this example, the Frontend subnet is not force tunneled. The workloads in the Frontend subnet can continue to accept and respond to customer requests from the Internet directly. The Mid-tier and Backend subnets are forced tunneled. Any outbound connections from these two subnets to the Internet will be forced or redirected back to an on-premises site via one of the Site-to-site (S2S) VPN tunnels.
25+
In this example, the Frontend subnet is not force tunneled (split tunneling). The workloads in the Frontend subnet can continue to accept and respond to customer requests from the Internet directly. The Mid-tier and Backend subnets are forced tunneled. Any outbound connections from these two subnets to the Internet will be forced or redirected back to an on-premises site via one of the Site-to-site (S2S) VPN tunnels.
26+
27+
With a splitted tunneling type you can redirect all the traffic for specific subnets directly to on-premises, instead of other subnet that continue to have direct internet access without redirection.
2728

2829
This allows you to restrict and inspect Internet access from your virtual machines or cloud services in Azure, while continuing to enable your multi-tier service architecture required. If there are no Internet-facing workloads in your virtual networks, you also can apply forced tunneling to the entire virtual networks.
2930

@@ -39,11 +40,11 @@ Forced tunneling in Azure is configured using virtual network custom user-define
3940
* Forced tunneling must be associated with a VNet that has a route-based VPN gateway. Your forced tunneling configuration will override the default route for any subnet in its VNet. You need to set a "default site" among the cross-premises local sites connected to the virtual network. Also, the on-premises VPN device must be configured using 0.0.0.0/0 as traffic selectors.
4041
* ExpressRoute forced tunneling is not configured via this mechanism, but instead, is enabled by advertising a default route via the ExpressRoute BGP peering sessions. For more information, see the [ExpressRoute Documentation](../expressroute/index.yml).
4142

42-
## Configuration overview
43+
## Split Tunneling Configuration overview
4344

4445
The following procedure helps you create a resource group and a VNet. You'll then create a VPN gateway and configure forced tunneling. In this procedure, the virtual network 'MultiTier-VNet' has three subnets: 'Frontend', 'Midtier', and 'Backend', with four cross-premises connections: 'DefaultSiteHQ', and three Branches.
4546

46-
The procedure steps set the 'DefaultSiteHQ' as the default site connection for forced tunneling, and configure the 'Midtier' and 'Backend' subnets to use forced tunneling.
47+
The procedure steps set the 'DefaultSiteHQ' as the default site connection for forced tunneling, and configure the 'Midtier' and 'Backend' subnets to use forced tunneling. If forced tunneling is to be adopted, all the subnet must have the default route table overwritten.
4748

4849
## <a name="before"></a>Before you begin
4950

@@ -80,30 +81,46 @@ Install the latest version of the Azure Resource Manager PowerShell cmdlets. See
8081
$s4 = New-AzVirtualNetworkSubnetConfig -Name "GatewaySubnet" -AddressPrefix "10.1.200.0/28"
8182
$vnet = New-AzVirtualNetwork -Name "MultiTier-VNet" -Location "North Europe" -ResourceGroupName "ForcedTunneling" -AddressPrefix "10.1.0.0/16" -Subnet $s1,$s2,$s3,$s4
8283
```
83-
3. Create the local network gateways.
84+
3. Create the Route Table.
85+
86+
```powershell
87+
New-AzRouteTable –Name "MyRouteTable" -ResourceGroupName "ForcedTunneling" –Label "Routing Table for Forced Tunneling" –Location "North Europe"
88+
```
89+
4. Set Route Table Configuration.
90+
91+
```powershell
92+
New-AzRouteTable –Name "MyRouteTable" -ResourceGroupName "ForcedTunneling" –Label "Routing Table for Forced Tunneling" –Location "North Europe"
93+
```
94+
5. Assign Route Table to the subnets
95+
96+
```powershell
97+
Set-AzVirtualNetworkSubnetConfig -VirtualNetwork "MultiTier-VNet" -Name "Midtier" -RouteTable "MyRouteTable"
98+
Set-AzVirtualNetworkSubnetConfig -VirtualNetwork "MultiTier-VNet" -Name "Backend" -RouteTable "MyRouteTable"
99+
```
100+
6. Create the local network gateways.
84101

85102
```powershell
86103
$lng1 = New-AzLocalNetworkGateway -Name "DefaultSiteHQ" -ResourceGroupName "ForcedTunneling" -Location "North Europe" -GatewayIpAddress "111.111.111.111" -AddressPrefix "192.168.1.0/24"
87104
$lng2 = New-AzLocalNetworkGateway -Name "Branch1" -ResourceGroupName "ForcedTunneling" -Location "North Europe" -GatewayIpAddress "111.111.111.112" -AddressPrefix "192.168.2.0/24"
88105
$lng3 = New-AzLocalNetworkGateway -Name "Branch2" -ResourceGroupName "ForcedTunneling" -Location "North Europe" -GatewayIpAddress "111.111.111.113" -AddressPrefix "192.168.3.0/24"
89106
$lng4 = New-AzLocalNetworkGateway -Name "Branch3" -ResourceGroupName "ForcedTunneling" -Location "North Europe" -GatewayIpAddress "111.111.111.114" -AddressPrefix "192.168.4.0/24"
90107
`````
91-
4. Create the virtual network gateway. Creating a gateway can often take 45 minutes or more, depending on the selected gateway SKU. If you see ValidateSet errors regarding the GatewaySKU value, verify that you have installed the [latest version of the PowerShell cmdlets](#before). The latest version of the PowerShell cmdlets contains the new validated values for the latest Gateway SKUs.
108+
7. Create the virtual network gateway. Creating a gateway can often take 45 minutes or more, depending on the selected gateway SKU. If you see ValidateSet errors regarding the GatewaySKU value, verify that you have installed the [latest version of the PowerShell cmdlets](#before). The latest version of the PowerShell cmdlets contains the new validated values for the latest Gateway SKUs.
92109
93110
```powershell
94111
$pip = New-AzPublicIpAddress -Name "GatewayIP" -ResourceGroupName "ForcedTunneling" -Location "North Europe" -AllocationMethod Dynamic
95112
$gwsubnet = Get-AzVirtualNetworkSubnetConfig -Name "GatewaySubnet" -VirtualNetwork $vnet
96113
$ipconfig = New-AzVirtualNetworkGatewayIpConfig -Name "gwIpConfig" -SubnetId $gwsubnet.Id -PublicIpAddressId $pip.Id
97114
New-AzVirtualNetworkGateway -Name "Gateway1" -ResourceGroupName "ForcedTunneling" -Location "North Europe" -IpConfigurations $ipconfig -GatewayType Vpn -VpnType RouteBased -GatewaySku VpnGw1 -EnableBgp $false
98115
```
99-
5. Assign a default site to the virtual network gateway. The **-GatewayDefaultSite** is the cmdlet parameter that allows the forced routing configuration to work, so take care to configure this setting properly.
116+
8. Assign a default site to the virtual network gateway. The **-GatewayDefaultSite** is the cmdlet parameter that allows the forced routing configuration to work, so take care to configure this setting properly.
100117

101118
```powershell
102119
$LocalGateway = Get-AzLocalNetworkGateway -Name "DefaultSiteHQ" -ResourceGroupName "ForcedTunneling"
103120
$VirtualGateway = Get-AzVirtualNetworkGateway -Name "Gateway1" -ResourceGroupName "ForcedTunneling"
104121
Set-AzVirtualNetworkGatewayDefaultSite -GatewayDefaultSite $LocalGateway -VirtualNetworkGateway $VirtualGateway
105122
```
106-
6. Establish the Site-to-Site VPN connections.
123+
9. Establish the Site-to-Site VPN connections.
107124

108125
```powershell
109126
$gateway = Get-AzVirtualNetworkGateway -Name "Gateway1" -ResourceGroupName "ForcedTunneling"

0 commit comments

Comments
 (0)