Skip to content

Commit b791575

Browse files
authored
Merge pull request #214678 from halkazwini/nw-portal
Network Watcher: Freshness: Tutorial: Log network traffic to and from a virtual machine using the Azure portal
2 parents d17337d + 0ad19a0 commit b791575

File tree

2 files changed

+16
-13
lines changed

2 files changed

+16
-13
lines changed
56.6 KB
Loading

articles/network-watcher/network-watcher-nsg-flow-logging-portal.md

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ services: network-watcher
55
author: damendo
66
ms.service: network-watcher
77
ms.topic: tutorial
8-
ms.date: 11/16/2021
8+
ms.date: 10/17/2022
99
ms.author: damendo
1010
ms.custom: mvc
1111
# Customer intent: I need to log the network traffic to and from a VM so I can analyze it for anomalies.
@@ -31,17 +31,19 @@ In this tutorial, you learn how to:
3131
> * Download logged data
3232
> * View logged data
3333
34+
If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
35+
3436
## Prerequisites
3537

36-
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
38+
- An Azure account with an active subscription.
3739

3840
## Create a virtual machine
3941

4042
1. Sign in to the [Azure portal](https://portal.azure.com).
4143

4244
2. In the search box at the top of the portal, enter **Virtual machine**. Select **Virtual machines**.
4345

44-
3. In **Virtual machines**, select **+ Create** then **+ Virtual machine**.
46+
3. In **Virtual machines**, select **+ Create** then **+ Azure virtual machine**.
4547

4648
4. Enter or select the following information in **Create a virtual machine**.
4749

@@ -59,7 +61,6 @@ In this tutorial, you learn how to:
5961
| Azure Spot instance | Leave the default. |
6062
| Size | Select a size. |
6163
| **Administrator account** | |
62-
| Authentication type | Select **SSH public key**. |
6364
| Username | Enter a username. |
6465
| Password | Enter a password. |
6566
| Confirm password | Confirm password. |
@@ -101,6 +102,8 @@ NSG flow logging requires the **Microsoft.Insights** provider. To register the p
101102

102103
5. Confirm the status of the provider displayed is **Registered**. If the status is **Unregistered**, select the provider then select **Register**.
103104

105+
:::image type="content" source="./media/network-watcher-nsg-flow-logging-portal/microsoft-insights-registered.png" alt-text="Screenshot of registering microsoft insights provider.":::
106+
104107
## Enable NSG flow log
105108

106109
NSG flow log data is written to an Azure Storage account. Complete the following steps to create a storage account for the log data.
@@ -117,12 +120,12 @@ NSG flow log data is written to an Azure Storage account. Complete the following
117120
| Subscription | Select your subscription. |
118121
| Resource group | Select **myResourceGroup**. |
119122
| **Instance details** | |
120-
| Storage account name | Enter a name for your storage account. </br> Must be 3-24 characters in length, can only contain lowercase letters and numbers, and must be unique across all Azure Storage. |
121-
| Region | Select **(US)East US**. |
123+
| Storage account name | Enter a name for your storage account. </br> Must be 3-24 characters long, and can contain only lowercase letters and numbers, and must be unique across all Azure Storage. |
124+
| Region | Select **(US) East US**. |
122125
| Performance | Leave the default of **Standard**. |
123126
| Redundancy | Leave the default of **Geo-redundant storage (GRS)**. |
124127

125-
4. Select **Review + create**.
128+
4. Select **Review**.
126129

127130
5. Select **Create**.
128131

@@ -182,7 +185,7 @@ The following example JSON displays data that you'll see in the PT1H.json file f
182185
"time": "2018-05-01T15:00:02.1713710Z",
183186
"systemId": "<Id>",
184187
"category": "NetworkSecurityGroupFlowEvent",
185-
"resourceId": "/SUBSCRIPTIONS/<Id>/RESOURCEGROUPS/MYRESOURCEGROUP/PROVIDERS/MICROSOFT.NETWORK/NETWORKSECURITYGROUPS/MYVM-NSG",
188+
"resourceId": "/SUBSCRIPTIONS/<subscriptionId>/RESOURCEGROUPS/MYRESOURCEGROUP/PROVIDERS/MICROSOFT.NETWORK/NETWORKSECURITYGROUPS/MYVM-NSG",
186189
"operationName": "NetworkSecurityGroupFlowEvents",
187190
"properties": {
188191
"Version": 1,
@@ -191,7 +194,7 @@ The following example JSON displays data that you'll see in the PT1H.json file f
191194
"rule": "UserRule_default-allow-rdp",
192195
"flows": [
193196
{
194-
"mac": "000D3A170C69",
197+
"mac": "<macAddress>",
195198
"flowTuples": [
196199
"1525186745,192.168.1.4,10.0.0.4,55960,3389,T,I,A"
197200
]
@@ -206,9 +209,9 @@ The following example JSON displays data that you'll see in the PT1H.json file f
206209
```json
207210
{
208211
"time": "2018-11-13T12:00:35.3899262Z",
209-
"systemId": "a0fca5ce-022c-47b1-9735-89943b42f2fa",
212+
"systemId": "<Id>",
210213
"category": "NetworkSecurityGroupFlowEvent",
211-
"resourceId": "/SUBSCRIPTIONS/00000000-0000-0000-0000-000000000000/RESOURCEGROUPS/FABRIKAMRG/PROVIDERS/MICROSOFT.NETWORK/NETWORKSECURITYGROUPS/FABRIAKMVM1-NSG",
214+
"resourceId": "/SUBSCRIPTIONS/<subscriptionId>/RESOURCEGROUPS/MYRESOURCEGROUP/PROVIDERS/MICROSOFT.NETWORK/NETWORKSECURITYGROUPS/MYVM-NSG",
212215
"operationName": "NetworkSecurityGroupFlowEvents",
213216
"properties": {
214217
"Version": 2,
@@ -217,7 +220,7 @@ The following example JSON displays data that you'll see in the PT1H.json file f
217220
"rule": "DefaultRule_DenyAllInBound",
218221
"flows": [
219222
{
220-
"mac": "000D3AF87856",
223+
"mac": "<macAddress>",
221224
"flowTuples": [
222225
"1542110402,94.102.49.190,10.5.16.4,28746,443,U,I,D,B,,,,",
223226
"1542110424,176.119.4.10,10.5.16.4,56509,59336,T,I,D,B,,,,",
@@ -230,7 +233,7 @@ The following example JSON displays data that you'll see in the PT1H.json file f
230233
"rule": "DefaultRule_AllowInternetOutBound",
231234
"flows": [
232235
{
233-
"mac": "000D3AF87856",
236+
"mac": "<macAddress>",
234237
"flowTuples": [
235238
"1542110377,10.5.16.4,13.67.143.118,59831,443,T,O,A,B,,,,",
236239
"1542110379,10.5.16.4,13.67.143.117,59932,443,T,O,A,E,1,66,1,66",

0 commit comments

Comments
 (0)