You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/firewall/deploy-cli.md
+31-37Lines changed: 31 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ description: In this article, you learn how to deploy and configure Azure Firewa
4
4
services: firewall
5
5
author: vhorne
6
6
ms.service: firewall
7
-
ms.date: 5/9/2019
7
+
ms.date: 6/8/2019
8
8
ms.author: victorh
9
9
#Customer intent: As an administrator new to this service, I want to control outbound network access from resources located in an Azure subnet.
10
10
---
@@ -20,7 +20,7 @@ One way you can control outbound network access from an Azure subnet is with Azu
20
20
21
21
Network traffic is subjected to the configured firewall rules when you route your network traffic to the firewall as the subnet default gateway.
22
22
23
-
For this article, you create a simplified single VNet with three subnets for easy deployment. For production deployments, a [hub and spoke model](https://docs.microsoft.com/azure/architecture/reference-architectures/hybrid-networking/hub-spoke) is recommended, where the firewall is in its own VNet. The workload servers are in peered VNets in the same region with one or more subnets.
23
+
For this article, you create a simplified single VNet with three subnets for easy deployment. For production deployments, a [hub and spoke model](https://docs.microsoft.com/azure/architecture/reference-architectures/hybrid-networking/hub-spoke) is recommended. The firewall is in its own VNet. The workload servers are in peered VNets in the same region with one or more subnets.
24
24
25
25
***AzureFirewallSubnet** - the firewall is in this subnet.
26
26
***Workload-SN** - the workload server is in this subnet. This subnet's network traffic goes through the firewall.
@@ -108,7 +108,21 @@ az vm create \
108
108
az vm open-port --port 3389 --resource-group Test-FW-RG --name Srv-Jump
109
109
```
110
110
111
-
Create a workload virtual machine with no public IP address.
111
+
112
+
113
+
Create a NIC for Srv-Work with specific DNS server IP addresses and no public IP address to test with.
114
+
115
+
```azurecli-interactive
116
+
az network nic create \
117
+
-g Test-FW-RG \
118
+
-n Srv-Work-NIC \
119
+
--vnet-name Test-FW-VN \
120
+
--subnet Workload-SN \
121
+
--public-ip-address "" \
122
+
--dns-servers 209.244.0.3 209.244.0.4
123
+
```
124
+
125
+
Now create the workload virtual machine.
112
126
When prompted, type a password for the virtual machine.
113
127
114
128
```azurecli-interactive
@@ -117,9 +131,7 @@ az vm create \
117
131
--name Srv-Work \
118
132
--location eastus \
119
133
--image win2016datacenter \
120
-
--vnet-name Test-FW-VN \
121
-
--subnet Workload-SN \
122
-
--public-ip-address "" \
134
+
--nics Srv-Work-NIC \
123
135
--admin-username azureadmin
124
136
```
125
137
@@ -146,11 +158,11 @@ az network firewall ip-config create \
146
158
--vnet-name Test-FW-VN
147
159
az network firewall update \
148
160
--name Test-FW01 \
149
-
--resource-group Test-FW-RG \
161
+
--resource-group Test-FW-RG
150
162
az network public-ip show \
151
163
--name fw-pip \
152
164
--resource-group Test-FW-RG
153
-
fwpipaddr="$(az network public-ip list -g Test-FW-RG --query "[?name=='fw-pip'].ipAddress" --output tsv)"
### Change the primary and secondary DNS address for the **Srv-Work** network interface
242
-
243
-
For testing purposes in this procedure, configure the server's primary and secondary DNS addresses. This isn't a general Azure Firewall requirement.
244
-
245
-
```azurepowershell
246
-
$NIC.DnsSettings.DnsServers.Add("209.244.0.3")
247
-
$NIC.DnsSettings.DnsServers.Add("209.244.0.4")
248
-
$NIC | Set-AzNetworkInterface
249
-
```
250
-
251
242
## Test the firewall
252
243
253
244
Now, test the firewall to confirm that it works as expected.
254
245
255
246
1. Note the private IP address for the **Srv-Work** virtual machine:
256
247
257
-
```
258
-
$NIC.IpConfigurations.PrivateIpAddress
259
-
```
248
+
```azureclii-interactive
249
+
az vm list-ip-addresses \
250
+
-g Test-FW-RG \
251
+
-n Srv-Work
252
+
```
260
253
261
254
1. Connect a remote desktop to **Srv-Jump** virtual machine, and sign in. From there, open a remote desktop connection to the **Srv-Work** private IP address and sign in.
262
255
@@ -290,8 +283,9 @@ So now you've verified that the firewall rules are working:
290
283
291
284
You can keep your firewall resources for the next tutorial, or if no longer needed, delete the **Test-FW-RG** resource group to delete all firewall-related resources:
0 commit comments