Skip to content

Commit

Permalink
VPN NAT for Virtual WAN feature changes (#11815)
Browse files Browse the repository at this point in the history
* VPN NAT for Virtual WAN feature changes

* PrettierCheck fixes

* Incorporate review comments and update examples
  • Loading branch information
Nilambari authored Dec 2, 2020
1 parent 1aebb6e commit df62eff
Show file tree
Hide file tree
Showing 11 changed files with 848 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"parameters": {
"natRuleName": "natRule1",
"gatewayName": "gateway1",
"resourceGroupName": "rg1",
"api-version": "2020-08-01",
"subscriptionId": "subid"
},
"responses": {
"200": {},
"202": {},
"204": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"parameters": {
"gatewayName": "gateway1",
"natRuleName": "natRule1",
"resourceGroupName": "rg1",
"api-version": "2020-08-01",
"subscriptionId": "subid"
},
"responses": {
"200": {
"body": {
"name": "natRule1",
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnGateways/gateway1/natRules/natRule1",
"etag": "w/\\00000000-0000-0000-0000-000000000000\\",
"properties": {
"provisioningState": "Succeeded",
"type": "Static",
"mode": "EgressSnat",
"internalMappings": [
{
"addressSpace": "10.4.0.0/24"
}
],
"externalMappings": [],
"egressVpnSiteLinkConnections": [],
"ingressVpnSiteLinkConnections": []
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{
"parameters": {
"gatewayName": "gateway1",
"api-version": "2020-08-01",
"resourceGroupName": "rg1",
"subscriptionId": "subid"
},
"responses": {
"200": {
"body": [
{
"name": "natRule1",
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnGateways/gateway1/natRules/natRule1",
"etag": "w/\\00000000-0000-0000-0000-000000000000\\",
"properties": {
"provisioningState": "Succeeded",
"type": "Static",
"mode": "EgressSnat",
"ipConfigurationId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/cloudnet1-VNG/ipConfigurations/default",
"internalMappings": [
{
"addressSpace": "10.4.0.0/24"
}
],
"externalMappings": [
{
"addressSpace": "192.168.21.0/24"
}
],
"egressVpnSiteLinkConnections": [
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnGateways/gateway1/vpnConnections/vpnConnection1/vpnLinkConnections/vpnLinkConnection1"
}
],
"ingressVpnSiteLinkConnections": [
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnGateways/gateway1/vpnConnections/vpnConnection1/vpnLinkConnections/vpnLinkConnection2"
}
]
}
},
{
"name": "natRule2",
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnGateways/gateway1/natRules/natRule2",
"etag": "w/\\00000000-0000-0000-0000-000000000000\\",
"properties": {
"provisioningState": "Succeeded",
"type": "Static",
"mode": "EgressSnat",
"ipConfigurationId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/cloudnet1-VNG1/ipConfigurations/default",
"internalMappings": [
{
"addressSpace": "10.4.0.0/24"
}
],
"externalMappings": [
{
"addressSpace": "192.168.21.0/24"
}
],
"egressVpnSiteLinkConnections": [
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnGateways/gateway1/vpnConnections/vpnConnection1/vpnLinkConnections/vpnLinkConnection1"
}
],
"ingressVpnSiteLinkConnections": [
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnGateways/gateway1/vpnConnections/vpnConnection1/vpnLinkConnections/vpnLinkConnection2"
}
]
}
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
{
"parameters": {
"natRuleName": "natRule1",
"gatewayName": "gateway1",
"resourceGroupName": "rg1",
"api-version": "2020-08-01",
"subscriptionId": "subid",
"NatRuleParameters": {
"properties": {
"type": "Static",
"mode": "EgressSnat",
"ipConfigurationId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/cloudnet1-VNG/ipConfigurations/default",
"internalMappings": [
{
"addressSpace": "10.4.0.0/24"
}
],
"externalMappings": [
{
"addressSpace": "192.168.21.0/24"
}
]
}
}
},
"responses": {
"200": {
"body": {
"name": "natRule1",
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnGateways/gateway1/natRules/natRule1",
"etag": "w/\\00000000-0000-0000-0000-000000000000\\",
"properties": {
"provisioningState": "Succeeded",
"type": "Static",
"mode": "EgressSnat",
"ipConfigurationId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/cloudnet1-VNG/ipConfigurations/default",
"internalMappings": [
{
"addressSpace": "10.4.0.0/24"
}
],
"externalMappings": [
{
"addressSpace": "192.168.21.0/24"
}
],
"egressVpnSiteLinkConnections": [
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnGateways/gateway1/vpnConnections/vpnConnection1/vpnLinkConnections/vpnLinkConnection1"
}
],
"ingressVpnSiteLinkConnections": [
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnGateways/gateway1/vpnConnections/vpnConnection1/vpnLinkConnections/vpnLinkConnection2"
}
]
}
}
},
"201": {
"body": {
"name": "natRule1",
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnGateways/gateway1/natRules/natRule1",
"etag": "w/\\00000000-0000-0000-0000-000000000000\\",
"properties": {
"provisioningState": "Succeeded",
"type": "Static",
"mode": "EgressSnat",
"ipConfigurationId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/cloudnet1-VNG/ipConfigurations/default",
"internalMappings": [
{
"addressSpace": "10.4.0.0/24"
}
],
"externalMappings": [
{
"addressSpace": "192.168.21.0/24"
}
],
"egressVpnSiteLinkConnections": [
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnGateways/gateway1/vpnConnections/vpnConnection1/vpnLinkConnections/vpnLinkConnection1"
}
],
"ingressVpnSiteLinkConnections": [
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnGateways/gateway1/vpnConnections/vpnConnection1/vpnLinkConnections/vpnLinkConnection2"
}
]
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,12 @@
"enableRateLimiting": false,
"useLocalAzureIpAddress": false,
"usePolicyBasedTrafficSelectors": false,
"routingWeight": 0
"routingWeight": 0,
"ingressNatRules": [
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnGateways/gateway1/natRules/nat03"
}
]
}
},
{
Expand All @@ -75,7 +80,12 @@
"enableRateLimiting": false,
"useLocalAzureIpAddress": false,
"usePolicyBasedTrafficSelectors": false,
"routingWeight": 0
"routingWeight": 0,
"egressNatRules": [
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnGateways/gateway1/natRules/nat04"
}
]
}
}
],
Expand Down Expand Up @@ -138,6 +148,56 @@
}
]
},
"natRules": [
{
"name": "nat03",
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnGateways/gateway1/natRules/nat03",
"properties": {
"type": "Dynamic",
"mode": "IgressSnat",
"internalMappings": [
{
"addressSpace": "0.0.0.0/26"
}
],
"externalMappings": [
{
"addressSpace": "192.168.0.0/26"
}
],
"ingressVpnSiteLinkConnections": [
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnGateways/gateway1/vpnConnections/vpnConnection1/vpnLinkConnections/Connection-Link1"
}
]
},
"type": "Microsoft.Network/vpnGateways/natRules"
},
{
"name": "nat04",
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnGateways/gateway1/natRules/nat04",
"properties": {
"type": "Static",
"mode": "EgressSnat",
"internalMappings": [
{
"addressSpace": "0.0.0.0/26"
}
],
"externalMappings": [
{
"addressSpace": "192.168.0.0/26"
}
],
"egressVpnSiteLinkConnections": [
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnGateways/gateway1/vpnConnections/vpnConnection1/vpnLinkConnections/Connection-Link2"
}
]
},
"type": "Microsoft.Network/vpnGateways/natRules"
}
],
"isRoutingPreferenceInternet": false
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,12 @@
"enableRateLimiting": false,
"useLocalAzureIpAddress": false,
"usePolicyBasedTrafficSelectors": false,
"routingWeight": 0
"routingWeight": 0,
"ingressNatRules": [
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnGateways/gateway1/natRules/nat03"
}
]
}
},
{
Expand All @@ -76,7 +81,12 @@
"enableRateLimiting": false,
"useLocalAzureIpAddress": false,
"usePolicyBasedTrafficSelectors": false,
"routingWeight": 0
"routingWeight": 0,
"egressNatRules": [
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnGateways/gateway1/natRules/nat04"
}
]
}
}
],
Expand Down Expand Up @@ -139,6 +149,56 @@
}
]
},
"natRules": [
{
"name": "nat03",
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnGateways/gateway1/natRules/nat03",
"properties": {
"type": "Dynamic",
"mode": "IgressSnat",
"internalMappings": [
{
"addressSpace": "0.0.0.0/26"
}
],
"externalMappings": [
{
"addressSpace": "192.168.0.0/26"
}
],
"ingressVpnSiteLinkConnections": [
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnGateways/gateway1/vpnConnections/vpnConnection1/vpnLinkConnections/Connection-Link1"
}
]
},
"type": "Microsoft.Network/vpnGateways/natRules"
},
{
"name": "nat04",
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnGateways/gateway1/natRules/nat04",
"properties": {
"type": "Static",
"mode": "EgressSnat",
"internalMappings": [
{
"addressSpace": "0.0.0.0/26"
}
],
"externalMappings": [
{
"addressSpace": "192.168.0.0/26"
}
],
"egressVpnSiteLinkConnections": [
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnGateways/gateway1/vpnConnections/vpnConnection1/vpnLinkConnections/Connection-Link2"
}
]
},
"type": "Microsoft.Network/vpnGateways/natRules"
}
],
"isRoutingPreferenceInternet": false
}
},
Expand Down Expand Up @@ -231,6 +291,7 @@
}
]
},
"natRules": [],
"isRoutingPreferenceInternet": false
}
}
Expand Down
Loading

0 comments on commit df62eff

Please sign in to comment.