Skip to content

Commit

Permalink
Add translatedFqdn field for Policy Nat Rule
Browse files Browse the repository at this point in the history
  • Loading branch information
tejasshah7 committed Oct 4, 2020
1 parent 8fb99ef commit ae7fc3d
Show file tree
Hide file tree
Showing 4 changed files with 204 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"parameters": {
"ruleCollectionGroupName": "ruleCollectionGroup1",
"firewallPolicyName": "firewallPolicy",
"resourceGroupName": "rg1",
"api-version": "2020-07-01",
"subscriptionId": "subid"
},
"responses": {
"200": {
"body": {
"name": "ruleCollectionGroup1",
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/firewallPolicies/firewallPolicy/ruleCollectionGroups/ruleCollectionGroup1",
"etag": "W/\"72090554-7e3b-43f2-80ad-99a9020dcb11\"",
"properties": {
"provisioningState": "Succeeded",
"priority": 100,
"ruleCollections": [
{
"ruleCollectionType": "FirewallPolicyNatRuleCollection",
"action": {
"type": "DNAT"
},
"rules": [
{
"ruleType": "NatRule",
"name": "NatRule1",
"translatedFqdn": "internalhttpserver",
"translatedPort": "8080",
"ipProtocols": [
"TCP",
"UDP"
],
"sourceAddresses": [
"2.2.2.2"
],
"sourceIpGroups": [],
"destinationAddresses": [
"152.23.32.23"
],
"destinationPorts": [
"8080"
]
}
],
"name": "NatRC",
"priority": 100
}
]
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
{
"parameters": {
"api-version": "2020-07-01",
"subscriptionId": "subid",
"resourceGroupName": "rg1",
"firewallPolicyName": "firewallPolicy",
"ruleCollectionGroupName": "ruleCollectionGroup1",
"parameters": {
"properties": {
"priority": 100,
"ruleCollections": [
{
"ruleCollectionType": "FirewallPolicyNatRuleCollection",
"priority": 100,
"name": "Example-Nat-Rule-Collection",
"action": {
"type": "DNAT"
},
"rules": [
{
"ruleType": "NatRule",
"name": "nat-rule1",
"translatedFqdn": "internalhttp.server.net",
"translatedPort": "8080",
"ipProtocols": [
"TCP",
"UDP"
],
"sourceAddresses": [
"2.2.2.2"
],
"sourceIpGroups": [],
"destinationAddresses": [
"152.23.32.23"
],
"destinationPorts": [
"8080"
]
}
]
}
]
}
}
},
"responses": {
"200": {
"body": {
"name": "ruleCollectionGroup1",
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/firewallPolicies/firewallPolicy/ruleCollectionGroups/ruleCollectionGroup1",
"etag": "w/\\00000000-0000-0000-0000-000000000000\\",
"properties": {
"provisioningState": "Succeeded",
"priority": 100,
"ruleCollections": [
{
"ruleCollectionType": "FirewallPolicyNatRuleCollection",
"name": "Example-Nat-Rule-Collection",
"priority": 100,
"action": {
"type": "DNAT"
},
"rules": [
{
"ruleType": "NatRule",
"name": "nat-rule1",
"translatedFqdn": "internalhttp.server.net",
"translatedPort": "8080",
"ipProtocols": [
"TCP",
"UDP"
],
"sourceAddresses": [
"2.2.2.2"
],
"sourceIpGroups": [],
"destinationAddresses": [
"152.23.32.23"
],
"destinationPorts": [
"8080"
]
}
]
}
]
}
}
},
"201": {
"body": {
"name": "firewallPolicy",
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/firewallPolicies/firewallPolicy",
"etag": "w/\\00000000-0000-0000-0000-000000000000\\",
"properties": {
"provisioningState": "Succeeded",
"ruleCollections": [
{
"ruleCollectionType": "FirewallPolicyNatRuleCollection",
"name": "Example-Nat-Rule-Collection",
"priority": 100,
"action": {
"type": "DNAT"
},
"rules": [
{
"ruleType": "NatRule",
"name": "nat-rule1",
"translatedFqdn": "internalhttp.server.net",
"translatedPort": "8080",
"ipProtocols": [
"TCP",
"UDP"
],
"sourceAddresses": [
"2.2.2.2"
],
"sourceIpGroups": [],
"destinationAddresses": [
"152.23.32.23"
],
"destinationPorts": [
"8080"
]
}
]
}
]
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@
"ruleCollectionGroupName": "ruleCollectionGroup1",
"parameters": {
"properties": {
"priority": 110,
"priority": 100,
"ruleCollections": [
{
"ruleCollectionType": "FirewallPolicyFilterRuleCollection",
"name": "Example-Filter-Rule-Collection",
"priority": 100,
"action": {
"type": "Deny"
},
Expand Down Expand Up @@ -46,11 +47,12 @@
"etag": "w/\\00000000-0000-0000-0000-000000000000\\",
"properties": {
"provisioningState": "Succeeded",
"priority": 110,
"priority": 100,
"ruleCollections": [
{
"ruleCollectionType": "FirewallPolicyFilterRuleCollection",
"name": "Example-Filter-Rule-Collection",
"priority": 100,
"action": {
"type": "Deny"
},
Expand Down Expand Up @@ -84,11 +86,12 @@
"etag": "w/\\00000000-0000-0000-0000-000000000000\\",
"properties": {
"provisioningState": "Succeeded",
"priority": 110,
"priority": 100,
"ruleCollections": [
{
"ruleCollectionType": "FirewallPolicyFilterRuleCollection",
"name": "Example-Filter-Rule-Collection",
"priority": 100,
"action": {
"type": "Deny"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,9 @@
},
"Get FirewallPolicyRuleCollectionGroup With IpGroups": {
"$ref": "./examples/FirewallPolicyRuleCollectionGroupWithIpGroupsGet.json"
},
"Get FirewallPolicyNatRuleCollectionGroup": {
"$ref": "./examples/FirewallPolicyNatRuleCollectionGroupGet.json"
}
}
},
Expand Down Expand Up @@ -489,6 +492,9 @@
},
"Create FirewallPolicyRuleCollectionGroup With IpGroups": {
"$ref": "./examples/FirewallPolicyRuleCollectionGroupWithIpGroupsPut.json"
},
"Create FirewallPolicyNatRuleCollectionGroup": {
"$ref": "./examples/FirewallPolicyNatRuleCollectionGroupPut.json"
}
},
"x-ms-long-running-operation": true,
Expand Down Expand Up @@ -916,6 +922,10 @@
"items": {
"type": "string"
}
},
"translatedFqdn": {
"type": "string",
"description": "The translated FQDN for this NAT rule."
}
}
},
Expand Down Expand Up @@ -1187,7 +1197,7 @@
"properties": {
"id": {
"type": "string",
"description": "Signature id"
"description": "Signature id."
},
"mode": {
"$ref": "#/definitions/FirewallPolicyIntrusionDetectionStateOptions",
Expand Down

0 comments on commit ae7fc3d

Please sign in to comment.