Skip to main content

Configure Firewall

To filter traffic, you can use:

For any firewall rules, you can create IP Sets, which are groups of IP addresses.

Edge Gateway Firewall

Edge Gateway Firewall rules are configured on the Edge gateway. Traffic between the Edge gateway networks and external networks (North-South)—including internet traffic—as well as traffic passing through the global router, is always filtered. You need to configure Edge Gateway Firewall if you are setting up internet access:

Traffic filtering between networks connected to an Edge router (East-West traffic) depends on the network infrastructure type of the cluster where the virtual data center is located:

  • old type (NSX-V) — East-West traffic is filtered;
  • new type (NSX-T) — East-West traffic is not filtered. To filter this type of traffic, configure a Distributed Firewall.

In clusters on the new network infrastructure type (NSX-T), Edge Gateway Firewall is always enabled, and the default_rule blocks all traffic. To allow traffic, add other Edge Gateway Firewall rules.

In NSX-V clusters, a similar default rule for ingress traffic blocks all traffic if Edge Gateway Firewall is enabled and no other rules are configured. In such clusters, Edge Gateway Firewall can be disabled or configured with other Edge Gateway Firewall rules.

Add an Edge Gateway Firewall rule

You can use rule examples for outgoing and incoming traffic.

The method for creating a firewall rule depends on the network infrastructure type of the cluster where the virtual datacenter is located: legacy (NSX-V) or new (NSX-T).

  1. Optional: create IP Sets for source and destination addresses.

  2. From the Control panel, open the Cloud Director panel: in the top menu, click Products → VMware-based Cloud → the Cloud Director section.

  3. Open the virtual datacenter page.

  4. Go to Networking → Edges.

  5. Open the page of the required Edge gateway.

  6. Click Services.

  7. Open the Firewall tab.

  8. To enable the rule immediately after creation, turn on the Enabled toggle switch.

  9. Click .

  10. In the Name field, enter a name for the rule.

  11. In the Source field, configure the source addresses:

    11.1. Click .

    11.2. If you want to select all source addresses, leave the Any value.

    11.3. If you want to select source addresses from an IP Set or other object types, click , in the Browse objects of type field, select the object type, select the objects, and click → KEEP. Available object types:

    • Gateway interfaces — all internal networks (Internal), all external networks (External), or all external and internal networks (Any);
    • Virtual machines — virtual machines;
    • OrgVdcNetworks — organization-level networks;
    • IP Sets — groups of IP addresses;
    • Security Groups — security groups.

    11.4. If you want to select individual source IP addresses, click IP, enter the IP address, and click KEEP.

  12. In the Service field, configure the connection:

    12.1. If you want to select all protocols and ports, leave the Any value.

    12.2. If you want to select specific protocols and ports, click , configure the protocol and ports, and click KEEP.

  13. In the Action field, select the action to be performed by the rule:

    • Accept — traffic will be allowed;
    • Deny — traffic will be blocked.
  14. In the Destination field, configure the destination addresses:

    14.1. Click .

    14.2. If you want to select all destination addresses, leave the Any value.

    14.3. If you want to select destination addresses from an IP Set or other object types, click , in the Browse objects of type field, select the object type, select the objects, and click → KEEP. Available object types:

    • Gateway interfaces — all internal networks (Internal), all external networks (External), or all external and internal networks (Any);
    • Virtual machines — virtual machines;
    • OrgVdcNetworks — organization-level networks;
    • IP Sets — groups of IP addresses;
    • Security Groups — security groups.

    13.4. If you want to select individual destination IP addresses, click IP, enter the IP address, and click KEEP.

  15. Click Save changes.

Disable Edge Gateway Firewall

For your information

You can disable Edge Gateway Firewall only in clusters with the legacy network infrastructure type (NSX-V).

  1. From the control panel, open the Cloud Director panel: in the top menu, click Products → VMware-based Cloud → the Cloud Director section.
  2. Open the virtual data center page.
  3. Go to Networking → Edges.
  4. Open the page of the required Edge.
  5. Click Services.
  6. Open the Firewall tab.
  7. Turn off the Enabled toggle switch.

Example of an outbound traffic rule

Outbound traffic will be allowed for all protocols. The source IP address depends on the subnet of the virtual machine for which you want to allow outbound traffic:

The method for creating a Firewall rule depends on the network infrastructure type of the cluster where the virtual data center is located — legacy (NSX-V) or new (NSX-T).

  1. From the control panel, open the Cloud Director panel: in the top menu, click Products → VMware-based Cloud → the Cloud Director section.

  2. Open the virtual data center page.

  3. Go to Networking → Edges.

  4. Open the page of the required Edge.

  5. Click Services.

  6. Open the Firewall tab.

  7. To enable the rule immediately after creation, turn on the Enabled toggle.

  8. Click .

  9. In the Name field, enter the rule name.

  10. In the Source field, configure the source address:

    10.1. Click IP.

    10.2. Enter the IP address of the virtual machine for which outbound traffic will be allowed.

    10.3. Click KEEP.

  11. In the Destination field, leave the value as Any.

  12. In the Service field, leave the value as Any.

  13. In the Action field, select Accept.

  14. Click Save changes.

Example of an inbound traffic rule

Inbound traffic will be allowed via the TCP protocol on port 80. The destination IP address depends on the subnet of the virtual machine for which you need to allow inbound traffic:

The method for creating a firewall rule depends on the network infrastructure type of the cluster where the virtual data center is located: old (NSX-V) or new (NSX-T).

  1. From the control panel, open the Cloud Director panel: in the top menu, click Products → VMware-based Cloud → Cloud Director section.

  2. Open the virtual data center page.

  3. Go to Networking → Edges.

  4. Open the page of the required Edge.

  5. Click Services.

  6. Open the Firewall tab.

  7. To enable the rule immediately after creation, turn on the Enabled toggle switch.

  8. Click .

  9. In the Name field, enter the rule name.

  10. In the Source field, leave the value as Any.

  11. In the Destination field, configure the destination address:

    11.1. Click IP.

    11.2. Enter the external IP address through which incoming traffic will be allowed.

    11.3. Click KEEP.

  12. In the Service field, configure the protocol and port:

    12.1. Click .

    12.2. In the Protocol field, select TCP.

    12.3. In the Source Port field, enter any.

    12.4. In the Destination Port field, leave the value as 80.

    12.5. Click KEEP.

  13. In the Action field, select Accept.

  14. Click Save changes.

Distributed Firewall

For your information

Distributed Firewall can only be configured in clusters on the new network infrastructure type (NSX-T).

Distributed Firewall (DFW) is a distributed firewall configured for a group of virtual data centers. It filters traffic between Edge router networks and external networks (North-South), including internet traffic, as well as East-West traffic between virtual machines without using an Edge router.

To get started, enable Distributed Firewall. Once enabled, you can add additional rules, disable rules, or disable Distributed Firewall completely.

Enable Distributed Firewall

When you enable Distributed Firewall, a default rule is automatically created that allows internal traffic between virtual data centers.

  1. Make sure you have created a virtual data center group.
  2. From the control panel, open the Cloud Director panel: in the top menu, click Products → VMware-based Cloud → Cloud Director section.
  3. Open the Networking → Data Center Groups tab.
  4. Open the virtual data center group page → General section.
  5. In the Distributed Firewall block, click ACTIVATE DISTRIBUTED FIREWALL.
  6. Click ACTIVATE DISTRIBUTED FIREWALL.

Add a Distributed Firewall rule

  1. Optional: create IP Sets for source and destination addresses.

  2. From the control panel, open the Cloud Director panel: in the top menu, click Products → VMware-based Cloud → the Cloud Director section.

  3. Go to Networking → Data Center Groups.

  4. Open the virtual data center group page → the DISTRIBUTED FIREWALL section.

  5. Click NEW.

  6. In the Name field, enter the rule name.

  7. To enable the rule immediately after creation, turn on the State toggle.

  8. Optional: in the Applications field, configure the virtual machine destination port:

    8.1. Click .

    8.2. Turn on the Choose a specific application toggle.

    8.3. Select the required port.

    8.4. Click SAVE.

  9. Optional: in the Context field, select a context profile—a set of characteristics for determining the application or traffic type:

    9.1. Click .

    9.2. Turn on the Choose a specific profile toggle.

    9.3. Select the required profile.

    9.4. Click SAVE.

  10. In the Source field, configure the source addresses:

    10.1. Click .

    10.2. To select all source addresses, turn on the Any Source toggle.

    10.3. To select source addresses from an IP Set, on the Firewall Groups tab, select the IP Set that you created in step 1.

    10.4. To select specific source IP addresses, on the Firewall IP Addresses tab, click ADD and enter the IP addresses.

    10.5. Click KEEP.

  11. In the Destination field, configure the destination addresses:

    11.1. Click .

    11.2. If you want to select all destination addresses, turn on the Any Destination toggle switch.

    11.3. If you want to select destination addresses from an IP Set, on the Firewall Groups tab, select the IP Set you created in step 1.

    11.4. If you want to select individual destination IP addresses, on the Firewall IP Addresses tab, click ADD and enter the IP addresses.

    11.5. Click KEEP.

  12. In the Action field, select the action to be performed by the rule:

    • Allow — traffic will be allowed;
    • Drop — traffic will be blocked, and blocking notifications will not be sent to clients;
    • Reject — traffic will be blocked, and blocking notifications will be sent to clients.
  13. In the IP Protocol field, select the type of IP addresses to which the rule will apply.

  14. Optional: to record filtering logs, turn on the Enable logging toggle switch.

  15. Click SAVE.

Disable Distributed Firewall rules

Disabled rules will not be deleted; you can enable them later.

When all Distributed Firewall rules are disabled, traffic will no longer be filtered.

  1. From the control panel, open the Cloud Director panel: in the top menu, click Products → VMware-based Cloud → Cloud Director section.
  2. Open the Networking → Data Center Groups tab.
  3. Open the virtual data center group page → DISTRIBUTED FIREWALL section.
  4. In the Default Policy Status field, click DISABLE.

Disable Distributed Firewall

When Distributed Firewall is disabled, traffic will no longer be filtered and created rules will be permanently deleted.

  1. Disable all Distributed Firewall rules.
  2. From the control panel, open the Cloud Director panel: in the top menu, click Products → VMware-based Cloud → the Cloud Director section.
  3. Open the Networking → Data Center Groups tab.
  4. Open the virtual data center group page → the General section.
  5. In the Distributed Firewall block, click ACTIVATE DISTRIBUTED FIREWALL.
  6. Click DEACTIVATE DISTRIBUTED FIREWALL.

Create an IP Set

An IP Set is a group of IP addresses to which Firewall rules are applied. Grouping IP addresses into an IP Set allows you not to create a separate rule for each IP address. You can create multiple IP Sets and use them in different Firewall rules or in the same rule for sources and destination addresses.

The method for creating an IP Set depends on the network infrastructure type of the cluster where the virtual data center is located: legacy (NSX-V) or new (NSX-T).

  1. From the control panel, open the Cloud Director panel: in the top menu, click Products → VMware-based Cloud → the Cloud Director section.

  2. Open the virtual data center page.

  3. Go to Networking → Edges.

  4. Open the desired Edge page.

  5. Click Services.

  6. Open the Grouping object → IP Sets tab.

  7. Click .

  8. Configure the IP Set:

    8.1. In the Name field, enter the group name.

    8.2. In the IP Addresses field, enter IP addresses or IP address ranges.

    8.3. Click Keep.