Skip to content

Commit 379814c

Browse files
committed
edit ps steps
1 parent 344f11b commit 379814c

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

articles/dns/dns-traffic-log-how-to.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ Set up a local PowerShell repository and install the Az.DnsResolver PowerShell m
279279
Write-Host $diagnosticSetting.ToJsonString()
280280
281281
Write-Host "Creating domain list"
282-
$domainList = New-AzDnsResolverDomainList -Location $region -ResourceGroupName $resourceGroupName -Name $domainListName -Domain @("contoso.com.", "example.com.")
282+
$domainList = New-AzDnsResolverDomainList -Location $region -ResourceGroupName $resourceGroupName -Name $domainListName -Domain @("contoso.com.", "adatum.com.")
283283
Write-Host $domainList.ToJsonString()
284284
285285
Write-Host "Creating DNS security policy rule"
@@ -345,9 +345,27 @@ Set up a local PowerShell repository and install the Az.DnsResolver PowerShell m
345345
Write-Host $rule.ToJsonString()
346346
```
347347
348+
## Test DNS security policy
349+
350+
To test your new security policy, connect to a host device inside the virtual network and issue a query for the domains that you blocked. In this example the domainlist is **contoso.com** and **adatum.com**.
351+
352+
Input:
353+
```PowerShell
354+
Resolve-DnsName -Name contoso.com -Type NS
355+
```
356+
357+
Output:
358+
```PowerShell
359+
Resolve-DnsName : contoso.com : DNS server failure
360+
At line:1 char:1
361+
+ Resolve-DnsName -Name contoso.com -Type NS
362+
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
363+
+ CategoryInfo : ResourceUnavailable: (contoso.com:String) [Resolve-DnsName], Win32Exception
364+
+ FullyQualifiedErrorId : RCODE_SERVER_FAILURE,Microsoft.DnsClient.Commands.ResolveDnsName
365+
```
348366
---
349367

350-
## Next steps
368+
## Related content
351369

352370
- Review concepts related to [DNS security policy](dns-security-policy.md).
353371
- Review [Azure Private DNS zones scenarios](private-dns-scenarios.md).

0 commit comments

Comments
 (0)