Skip to content

Commit c8657bd

Browse files
committed
minor change
1 parent d35f47b commit c8657bd

1 file changed

Lines changed: 27 additions & 59 deletions

File tree

articles/firewall/tutorial-firewall-deploy-portal.md

Lines changed: 27 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ In this article, you learn how to:
4040
> * Create a default route
4141
> * Configure an application rule to allow access to www.google.com
4242
> * Configure a network rule to allow access to external DNS servers
43-
> * Deploy Azure Bastion for secure VM access
43+
> * Configure a NAT rule to allow a remote desktop to the test server
4444
> * Test the firewall
4545
4646
> [!NOTE]
@@ -103,20 +103,17 @@ This virtual network has two subnets.
103103
Now create the workload virtual machine, and place it in the **Workload-SN** subnet.
104104

105105
1. On the Azure portal menu or from the **Home** page, select **Create a resource**.
106-
2. Select **Ubuntu Server 22.04 LTS**.
106+
2. Select **Windows Server 2019 Datacenter**.
107107
4. Enter these values for the virtual machine:
108108

109109
|Setting |Value |
110110
|---------|---------|
111111
|Resource group |**Test-FW-RG**|
112112
|Virtual machine name |**Srv-Work**|
113113
|Region |Same as previous|
114-
|Image|Ubuntu Server 22.04 LTS - x64 Gen2|
115-
|Size|Standard_B2s|
116-
|Authentication type|SSH public key|
117-
|Username |**azureuser**|
118-
|SSH public key source|Generate new key pair|
119-
|Key pair name|**Srv-Work_key**|
114+
|Image|Windows Server 2019 Datacenter|
115+
|Administrator user name |Type a user name|
116+
|Password |Type a password|
120117

121118
4. Under **Inbound port rules**, **Public inbound ports**, select **None**.
122119
6. Accept the other defaults and select **Next: Disks**.
@@ -127,7 +124,6 @@ Now create the workload virtual machine, and place it in the **Workload-SN** sub
127124
1. Accept the defaults and select **Next: Monitoring**.
128125
1. For **Boot diagnostics**, select **Disable** to disable boot diagnostics. Accept the other defaults and select **Review + create**.
129126
1. Review the settings on the summary page, and then select **Create**.
130-
1. On the **Generate new key pair** dialog, select **Download private key and create resource**. Save the key file as **Srv-Work_key.pem**.
131127
1. After the deployment is complete, select **Go to resource** and note the **Srv-Work** private IP address that you'll need to use later.
132128

133129
[!INCLUDE [ephemeral-ip-note.md](~/reusable-content/ce-skilling/azure/includes/ephemeral-ip-note.md)]
@@ -213,36 +209,24 @@ This is the network rule that allows outbound access to two IP addresses at port
213209
1. For **Destination Ports**, type **53**.
214210
2. Select **Add**.
215211

216-
## Deploy Azure Bastion
212+
## Configure a DNAT rule
217213

218-
Now deploy Azure Bastion to provide secure access to the virtual machine.
214+
This rule allows you to connect a remote desktop to the Srv-Work virtual machine through the firewall.
219215

220-
1. On the Azure portal menu, select **Create a resource**.
221-
1. In the search box, type **Bastion** and select it from the results.
222-
1. Select **Create**.
223-
1. On the **Create a Bastion** page, configure the following settings:
224-
225-
| Setting | Value |
226-
|---------|-------|
227-
| Subscription | Select your subscription |
228-
| Resource group | **Test-FW-RG** |
229-
| Name | **Test-Bastion** |
230-
| Region | Same region as previous resources |
231-
| Tier | **Developer** |
232-
| Virtual network | **Test-FW-VN** |
233-
| Subnet | Select **Manage subnet configuration** |
234-
235-
1. In the **Subnets** page, select **+ Subnet**.
236-
1. Configure the new subnet:
237-
- **Name**: **AzureBastionSubnet** (this name is required)
238-
- **Subnet address range**: **10.0.4.0/26**
239-
1. Select **Save** and close the subnets page.
240-
1. Back on the **Create a Bastion** page, for **Public IP address**, select **Create new**.
241-
1. For **Public IP address name**, type **Bastion-pip**.
242-
1. Select **Review + create**.
243-
1. After validation passes, select **Create**.
216+
1. Select the **NAT rule collection** tab.
217+
2. Select **Add NAT rule collection**.
218+
3. For **Name**, type **rdp**.
219+
4. For **Priority**, type **200**.
220+
5. Under **Rules**, for **Name**, type **rdp-nat**.
221+
6. For **Protocol**, select **TCP**.
222+
7. For **Source type**, select **IP address**.
223+
8. For **Source**, type **\***.
224+
9. For **Destination address**, type the firewall public IP address.
225+
10. For **Destination Ports**, type **3389**.
226+
11. For **Translated address**, type the Srv-work private IP address.
227+
12. For **Translated port**, type **3389**.
228+
13. Select **Add**.
244229

245-
The Bastion deployment takes about 10 minutes to complete.
246230

247231
### Change the primary and secondary DNS address for the **Srv-Work** network interface
248232

@@ -260,35 +244,19 @@ For testing purposes, configure the server's primary and secondary DNS addresses
260244

261245
Now, test the firewall to confirm that it works as expected.
262246

263-
1. In the Azure portal, navigate to the **Srv-Work** virtual machine.
264-
1. Select **Connect**, then select **Connect via Bastion**.
265-
1. Select **Use SSH Private Key from Local File**.
266-
1. For **Username**, type **azureuser**.
267-
1. Select the folder icon and browse to the **Srv-Work_key.pem** file you downloaded earlier.
268-
1. Select **Connect**.
269-
1. At the bash prompt, run the following commands to test DNS resolution:
270-
271-
```bash
272-
nslookup www.google.com
273-
nslookup www.microsoft.com
274-
```
275-
276-
Both commands should return answers, showing that your DNS queries are getting through the firewall.
247+
1. Connect a remote desktop to the firewall public IP address and sign in to the Srv-Work virtual machine.
248+
1. Open Internet Explorer and browse to `https://www.google.com`.
249+
4. Select **OK** > **Close** on the Internet Explorer security alerts.
277250

278-
1. Run the following commands to test the application rule:
251+
You should see the Google home page.
279252

280-
```bash
281-
curl https://www.google.com
282-
curl https://www.microsoft.com
283-
```
253+
5. Browse to `https://www.microsoft.com`.
284254

285-
The `www.google.com` request should succeed, and you should see the HTML response.
286-
287-
The `www.microsoft.com` request should fail, showing that the firewall is blocking the request.
255+
The firewall should block you.
288256

289257
So now you verified that the firewall rules are working:
290258

291-
* You can connect to the virtual machine using Bastion and SSH.
259+
* You can connect to the virtual machine using RDP.
292260
* You can browse to the one allowed FQDN, but not to any others.
293261
* You can resolve DNS names using the configured external DNS server.
294262

0 commit comments

Comments
 (0)