Create a sandbox setup of Azure Firewall with Linux jumpbox and Linux server
{"type": "microsoft.network/routetables", "name": "[variables('azfwroutetablename')]", "apiversion": "2020-05-01", "location": "[parameters('location')]", "properties": {"disablebgproutepropagation": false, "routes": [{"name": "azfwdefaultroute", "properties": {"addressprefix": "0.0.0.0/0", "nexthoptype": "virtualappliance", "nexthopipaddress": "[variables('nexthopip')]"}}]}}{"comments": "simple network security group for subnet [variables('serverssubnetname')]", "type": "microsoft.network/networksecuritygroups", "apiversion": "2020-05-01", "name": "[variables('networksecuritygroupname')]", "location": "[parameters('location')]", "properties": {}}{"name": "[parameters('virtualnetworkname')]", "apiversion": "2020-05-01", "type": "microsoft.network/virtualnetworks", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/routetables", variables('azfwroutetablename'))]", "[resourceid('microsoft.network/networksecuritygroups", variables('networksecuritygroupname'))]"], "tags": {"displayname": "[parameters('virtualnetworkname')]"}, "properties": {"addressspace": {"addressprefixes": ["[variables('vnetaddressprefix')]"]}, "subnets": [{"name": "[variables('jumpboxsubnetname')]", "properties": {"addressprefix": "[variables('jumpboxsubnetprefix')]"}}, {"name": "[variables('azurefirewallsubnetname')]", "properties": {"addressprefix": "[variables('azurefirewallsubnetprefix')]"}}, {"name": "[variables('serverssubnetname')]", "properties": {"addressprefix": "[variables('serverssubnetprefix')]", "routetable": {"id": "[resourceid('microsoft.network/routetables", variables('azfwroutetablename'))]"}, "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('networksecuritygroupname'))]"}}}]}}{"name": "[concat(variables('publicipnameprefix'), add(copyindex(), 1))]", "type": "microsoft.network/publicipaddresses", "apiversion": "2020-05-01", "location": "[parameters('location')]", "sku": {"name": "standard"}, "copy": {"name": "publicipcopy", "count": "[parameters('numberoffirewallpublicipaddresses')]"}, "properties": {"publicipallocationmethod": "static", "publicipaddressversion": "ipv4"}}{"name": "[variables('jumpboxpublicipaddressname')]", "type": "microsoft.network/publicipaddresses", "apiversion": "2020-05-01", "location": "[parameters('location')]", "properties": {"publicipallocationmethod": "dynamic"}}{"name": "[variables('jumpboxnsgname')]", "type": "microsoft.network/networksecuritygroups", "apiversion": "2020-05-01", "location": "[parameters('location')]", "properties": {"securityrules": [{"name": "mynetworksecuritygrouprulessh", "properties": {"protocol": "tcp", "sourceportrange": "*", "destinationportrange": "22", "sourceaddressprefix": "*", "destinationaddressprefix": "*", "access": "allow", "priority": 1000, "direction": "inbound"}}]}}{"apiversion": "2020-05-01", "type": "microsoft.network/networkinterfaces", "name": "[variables('jumpboxnicname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/publicipaddresses", variables('jumpboxpublicipaddressname'))]", "[resourceid('microsoft.network/virtualnetworks", parameters('virtualnetworkname'))]", "[resourceid('microsoft.network/networksecuritygroups", variables('jumpboxnsgname'))]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"privateipallocationmethod": "dynamic", "publicipaddress": {"id": "[resourceid('microsoft.network/publicipaddresses", variables('jumpboxpublicipaddressname'))]"}, "subnet": {"id": "[variables('jumpboxsubnetid')]"}}}], "networksecuritygroup": {"id": "[resourceid('microsoft.network/networksecuritygroups", variables('jumpboxnsgname'))]"}}}{"apiversion": "2020-05-01", "type": "microsoft.network/networkinterfaces", "name": "[variables('servernicname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/virtualnetworks", parameters('virtualnetworkname'))]"], "properties": {"ipconfigurations": [{"name": "ipconfig1", "properties": {"privateipallocationmethod": "dynamic", "subnet": {"id": "[variables('serversubnetid')]"}}}]}}{"apiversion": "2020-04-01", "type": "microsoft.network/firewallpolicies", "name": "[variables('firewallpolicyname')]", "location": "[parameters('location')]", "properties": {"threatintelmode": "alert"}, "resources": [{"apiversion": "2020-04-01", "type": "rulegroups", "name": "networkrg", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/firewallpolicies", variables('firewallpolicyname'))]", "[resourceid('microsoft.network/firewallpolicies/rulegroups", variables('firewallpolicyname'), "apprg')]"], "properties": {"priority": 100, "rules": [{"name": "networkrule1", "conditiontype": "network", "ruletype": "firewallpolicyfilterrule", "action": {"type": "allow"}, "priority": 230, "ruleconditions": [{"name": "netrc1", "ipprotocols": ["tcp"], "destinationports": ["80"], "sourceaddresses": ["*"], "destinationaddresses": ["*"], "ruleconditiontype": "networkrulecondition"}]}]}}, {"apiversion": "2020-04-01", "type": "rulegroups", "name": "apprg", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/firewallpolicies", variables('firewallpolicyname'))]"], "properties": {"priority": 200, "rules": [{"name": "apprule1", "priority": 4444, "ruletype": "firewallpolicyfilterrule", "action": {"type": "allow"}, "ruleconditions": [{"ruleconditiontype": "applicationrulecondition", "name": "apprc1", "protocols": [{"protocoltype": "http", "port": 8000}], "targetfqdns": ["*"], "sourceaddresses": ["*"]}]}]}}]}{"apiversion": "2020-04-01", "type": "microsoft.network/azurefirewalls", "name": "[variables('firewallname')]", "location": "[parameters('location')]", "zones": "[if(equals(length(parameters('availabilityzones')), 0), json('null'), parameters('availabilityzones'))]", "dependson": ["[resourceid('microsoft.network/virtualnetworks", parameters('virtualnetworkname'))]", "[resourceid('microsoft.network/firewallpolicies", variables('firewallpolicyname'))]", "[resourceid('microsoft.network/firewallpolicies/rulegroups", variables('firewallpolicyname'), "apprg')]", "[resourceid('microsoft.network/firewallpolicies/rulegroups", variables('firewallpolicyname'), "networkrg')]", "publicipcopy"], "properties": {"ipconfigurations": "[variables('azurefirewallipconfigurations')]", "firewallpolicy": {"id": "[resourceid('microsoft.network/firewallpolicies", variables('firewallpolicyname'))]"}}} 