AZ-500: Microsoft Azure Security Technologies - Configuring TCP Port 7777 for Internet Access to VNET1\subnet0

Configuring TCP Port 7777 for Internet Access to VNET1\subnet0

Question

SIMULATION -

You need to ensure that connections from the Internet to VNET1\subnet0 are allowed only over TCP port 7777. The solution must use only currently deployed resources.

To complete this task, sign in to the Azure portal.

Explanations

See the explanation below.

You need to configure the Network Security Group that is associated with subnet0.

1. In the Azure portal, type Virtual Networks in the search box, select Virtual Networks from the search results then select VNET1. Alternatively, browse to

Virtual Networks in the left navigation pane.

2. In the properties of VNET1, click on Subnets. This will display the subnets in VNET1 and the Network Security Group associated to each subnet. Note the name of the Network Security Group associated to Subnet0.

3. Type Network Security Groups into the search box and select the Network Security Group associated with Subnet0.

4. In the properties of the Network Security Group, click on Inbound Security Rules.

5. Click the Add button to add a new rule.

6. In the Source field, select Service Tag.

7. In the Source Service Tag field, select Internet.

8. Leave the Source port ranges and Destination field as the default values (* and All).

9. In the Destination port ranges field, enter 7777.

10.Change the Protocol to TCP.

11.Leave the Action option as Allow.

12.Change the Priority to 100.

13.Change the Name from the default Port_8080 to something more descriptive such as Allow_TCP_7777_from_Internet. The name cannot contain spaces.

14.Click the Add button to save the new rule.

Certainly, I'd be happy to help!

Here are the steps you can follow to ensure that connections from the Internet to VNET1\subnet0 are allowed only over TCP port 7777 using currently deployed resources in Azure:

  1. First, sign in to the Azure portal at https://portal.azure.com.

  2. In the Azure portal, navigate to the virtual network (VNET1) that contains the subnet (subnet0) where you want to restrict access.

  3. Click on the "Subnets" tab in the left-hand menu, and then click on the name of the subnet you want to restrict access to (subnet0).

  4. In the "subnet0" blade, click on the "Service endpoints" tab.

  5. If service endpoints are not already enabled for this subnet, enable them by clicking on the "Add" button and selecting the service or services you want to enable. You can skip this step if service endpoints are already enabled for this subnet.

  6. Next, click on the "Network security group" link at the top of the "subnet0" blade.

  7. In the "Network security group" blade, click on the "Inbound security rules" tab.

  8. Click on the "Add" button to create a new inbound security rule.

  9. In the "Add inbound security rule" blade, enter the following settings:

  • Name: Enter a name for the new security rule (e.g. "Allow_TCP_7777_from_Internet").
  • Priority: Enter a priority number for the new security rule. This determines the order in which the security rules are evaluated. Use a number higher than any existing rules to ensure that this rule is evaluated last.
  • Source: Enter "Internet" to allow connections from any IP address on the Internet.
  • Protocol: Select "TCP" from the drop-down list.
  • Source port ranges: Leave this field blank to allow any source port.
  • Destination: Select "VirtualNetwork" from the drop-down list.
  • Destination port ranges: Enter "7777" to allow connections only to TCP port 7777.
  • Action: Select "Allow" to allow traffic that matches this rule.
  • Priority: Enter a priority number for the new security rule. This determines the order in which the security rules are evaluated. Use a number higher than any existing rules to ensure that this rule is evaluated last.
  1. Click the "Add" button to create the new security rule.

  2. Once the new security rule is created, it will be evaluated in addition to any existing security rules. Make sure to test the connectivity to ensure that the traffic is now restricted to TCP port 7777 from the Internet to VNET1\subnet0.

That's it! With these steps, you have ensured that connections from the Internet to VNET1\subnet0 are allowed only over TCP port 7777 using currently deployed resources in Azure.