注:この質問は、同じシナリオを提示する一連の質問の一部です。シリーズの各質問には、指定された目標を達成する可能性のある独自のソリューションが含まれています。一部の質問セットには複数の正しい解決策がある場合がありますが、他の質問セットには正しい解決策がない場合があります。
このセクションの質問に回答した後は、その質問に戻ることはできません。その結果、これらの質問はレビュー画面に表示されません。
10個の仮想ネットワークを含むAzureサブスクリプションがあります。仮想ネットワークは、個別のリソースグループでホストされます。
別の管理者が、サブスクリプションにいくつかのネットワークセキュリティグループ(NSG)を作成することを計画しています。
NSGが作成されると、仮想ネットワーク間のTCPポート8080が自動的にブロックされるようにする必要があります。
解決策:組み込みのポリシー定義をサブスクリプションに割り当てます。
これは目標を達成していますか?
正解:B
No, this does not meet the goal. Assigning a built-in policy definition to the subscription is not enough to ensure that when an NSG is created, it automatically blocks TCP port 8080 between the virtual networks. This is because there is no built-in policy definition that matches this requirement. The closest built-in policy definition is "Network security groups should not allow unrestricted inbound traffic on well-known ports", but this policy only blocks TCP port 80 and 443, not 80801.
To meet the goal, you need to create a custom policy definition that enforces a default security rule for NSGs. A policy definition is a set of rules and actions that Azure performs when evaluating your resources2. You can use a policy definition to specify the required properties and values for NSGs, such as the direction, protocol, source, destination, and port of the security rule. You can then assign the policy definition to the subscription scope, so that it applies to all the resource groups and virtual networks in the subscription.