Skip to content

Commit

Permalink
VPN NAT for Virtual Network Gateway feature changes(networkFeb) (#13481)
Browse files Browse the repository at this point in the history
* commit1

* commit2

* resolving comments

* pythonMd

Co-authored-by: Khushboo Baheti <[email protected]>
  • Loading branch information
Khushboo-Baheti and Khushboo Baheti authored Mar 22, 2021
1 parent f432c7c commit 24b10b5
Show file tree
Hide file tree
Showing 15 changed files with 870 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,16 @@
"location": "centralus",
"tags": {}
},
"ingressNatRules": [
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/natRules/natRule1"
}
],
"egressNatRules": [
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/natRules/natRule2"
}
],
"connectionType": "IPsec",
"connectionProtocol": "IKEv2",
"routingWeight": 0,
Expand Down Expand Up @@ -87,6 +97,16 @@
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/localNetworkGateways/localgw",
"properties": {}
},
"ingressNatRules": [
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/natRules/natRule1"
}
],
"egressNatRules": [
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/natRules/natRule2"
}
],
"connectionType": "IPsec",
"connectionProtocol": "IKEv2",
"routingWeight": 0,
Expand Down Expand Up @@ -120,6 +140,16 @@
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/localNetworkGateways/localgw",
"properties": {}
},
"ingressNatRules": [
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/natRules/natRule1"
}
],
"egressNatRules": [
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/natRules/natRule2"
}
],
"connectionType": "IPsec",
"connectionProtocol": "IKEv2",
"routingWeight": 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,16 @@
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/localNetworkGateways/localgw",
"properties": {}
},
"ingressNatRules": [
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/natRules/natRule1"
}
],
"egressNatRules": [
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/natRules/natRule2"
}
],
"connectionType": "IPsec",
"connectionProtocol": "IKEv2",
"routingWeight": 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,16 @@
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/localNetworkGateways/lgw",
"properties": {}
},
"ingressNatRules": [
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/natRules/natRule1"
}
],
"egressNatRules": [
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/natRules/natRule2"
}
],
"connectionType": "IPsec",
"routingWeight": 0,
"sharedKey": "temp1234",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,16 @@
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/localNetworkGateways/localgw1",
"properties": {}
},
"ingressNatRules": [
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw1/natRules/natRule1"
}
],
"egressNatRules": [
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw1/natRules/natRule2"
}
],
"connectionType": "IPsec",
"connectionProtocol": "IKEv1",
"routingWeight": 0,
Expand Down Expand Up @@ -56,6 +66,16 @@
"properties": {},
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/localNetworkGateways/localgw2"
},
"ingressNatRules": [
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw2/natRules/natRule1"
}
],
"egressNatRules": [
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw2/natRules/natRule2"
}
],
"connectionType": "IPsec",
"connectionProtocol": "IKEv2",
"routingWeight": 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,49 @@
}
}
],
"natRules": [
{
"name": "natRule1",
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/natRules/natRule1",
"etag": "W/\"00ae2b69-88e7-4b3a-b66a-cfa2244e0801\"",
"properties": {
"provisioningState": "Succeeded",
"type": "Static",
"mode": "EgressSnat",
"internalMappings": [
{
"addressSpace": "10.10.0.0/24"
}
],
"externalMappings": [
{
"addressSpace": "50.0.0.0/24"
}
]
}
},
{
"name": "natRule2",
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/natRules/natRule2",
"etag": "W/\"00ae2b69-88e7-4b3a-b66a-cfa2244e0801\"",
"properties": {
"provisioningState": "Succeeded",
"type": "Static",
"mode": "IngressSnat",
"internalMappings": [
{
"addressSpace": "20.10.0.0/24"
}
],
"externalMappings": [
{
"addressSpace": "30.0.0.0/24"
}
]
}
}
],
"enableBgpRouteTranslationForNat": false,
"sku": {
"name": "VpnGw1",
"tier": "VpnGw1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,49 @@
}
}
],
"natRules": [
{
"name": "natRule1",
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw1/natRules/natRule1",
"etag": "W/\"00ae2b69-88e7-4b3a-b66a-cfa2244e0801\"",
"properties": {
"provisioningState": "Succeeded",
"type": "Static",
"mode": "EgressSnat",
"internalMappings": [
{
"addressSpace": "10.10.0.0/24"
}
],
"externalMappings": [
{
"addressSpace": "50.0.0.0/24"
}
]
}
},
{
"name": "natRule2",
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw1/natRules/natRule2",
"etag": "W/\"00ae2b69-88e7-4b3a-b66a-cfa2244e0801\"",
"properties": {
"provisioningState": "Succeeded",
"type": "Static",
"mode": "IngressSnat",
"internalMappings": [
{
"addressSpace": "20.10.0.0/24"
}
],
"externalMappings": [
{
"addressSpace": "30.0.0.0/24"
}
]
}
}
],
"enableBgpRouteTranslationForNat": false,
"sku": {
"name": "VpnGw1",
"tier": "VpnGw1",
Expand Down Expand Up @@ -89,6 +132,49 @@
}
}
],
"natRules": [
{
"name": "natRule1",
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw2/natRules/natRule1",
"etag": "W/\"00ae2b69-88e7-4b3a-b66a-cfa2244e0801\"",
"properties": {
"provisioningState": "Succeeded",
"type": "Static",
"mode": "EgressSnat",
"internalMappings": [
{
"addressSpace": "10.10.0.0/24"
}
],
"externalMappings": [
{
"addressSpace": "50.0.0.0/24"
}
]
}
},
{
"name": "natRule2",
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw2/natRules/natRule2",
"etag": "W/\"00ae2b69-88e7-4b3a-b66a-cfa2244e0801\"",
"properties": {
"provisioningState": "Succeeded",
"type": "Static",
"mode": "IngressSnat",
"internalMappings": [
{
"addressSpace": "20.10.0.0/24"
}
],
"externalMappings": [
{
"addressSpace": "30.0.0.0/24"
}
]
}
}
],
"enableBgpRouteTranslationForNat": false,
"sku": {
"name": "VpnGw1",
"tier": "VpnGw1",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"parameters": {
"natRuleName": "natRule1",
"virtualNetworkGatewayName": "gateway1",
"resourceGroupName": "rg1",
"api-version": "2021-02-01",
"subscriptionId": "subid"
},
"responses": {
"200": {},
"202": {},
"204": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"parameters": {
"virtualNetworkGatewayName": "gateway1",
"natRuleName": "natRule1",
"resourceGroupName": "rg1",
"api-version": "2021-02-01",
"subscriptionId": "subid"
},
"responses": {
"200": {
"body": {
"name": "natRule1",
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/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/gateway1/ipConfigurations/default",
"internalMappings": [
{
"addressSpace": "10.4.0.0/24"
}
],
"externalMappings": [
{
"addressSpace": "50.4.0.0/24"
}
]
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"parameters": {
"virtualNetworkGatewayName": "gateway1",
"api-version": "2021-02-01",
"resourceGroupName": "rg1",
"subscriptionId": "subid"
},
"responses": {
"200": {
"body": [
{
"name": "natRule1",
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/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/gateway1/ipConfigurations/default",
"internalMappings": [
{
"addressSpace": "10.4.0.0/24"
}
],
"externalMappings": [
{
"addressSpace": "192.168.21.0/24"
}
]
}
},
{
"name": "natRule2",
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/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/gateway1/ipConfigurations/default",
"internalMappings": [
{
"addressSpace": "10.4.0.0/24"
}
],
"externalMappings": [
{
"addressSpace": "192.168.21.0/24"
}
]
}
}
]
}
}
}
Loading

0 comments on commit 24b10b5

Please sign in to comment.