Appearance
Distributed Firewall ​
The Distributed Firewall delivers scalable, flexible protection against both internal and external threats by enforcing security policies at multiple points across the network. Operating at the hypervisor’s kernel outside of the VM’s guest OS, it manages traffic entering and leaving the VM through its virtual NIC.

The Distributed Firewall operates at the VM nic level. The lab, test and prod VMs are all protected by their own firewall, and the packets are assessed before reaching the physical network.
In opposition to a Gateway Firewall (which purpose is to stop attacks coming from the outside), the Distributed Firewall stops them spreading through the environment by limiting the lateral movement of the attacks in the internal network.
The Distributed Firewall also enables microsegmentation, allowing better workload protection.
WARNING
The default Distributed Firewall configuration present in a self managed tenant upon creation does not contain a DROP or REJECT rule. Meaning any-to-any traffic will be allowed. Creating secure and restrictive rules is strongly recommended.
Distributed Firewall Categories ​
The Distributed Firewall includes predefined categories for placing the rules.

- Ethernet: for L2 policies - not used
- Infrastructure: for non-application policies specific to infrastructure components
- Environment: for high level policy grouping – not used
- Application : for applications and microservices policies
Categories are processed from left to right, and rules within each category are enforced from top to bottom.
Provider Rules ​
When a tenant is created, some rules are automatically added. They contain all the infrastructure-specific rules, such as allowing DHCP and DNS.
The Provider Rules are created in the Infrastructure category under the policy named Provider-Tenant-Section-<tenant_name>.
Those rules should not be touched or modified.

Tenant Rules ​
The Tenant Rules are all the rules you will be creating and managing for your applications and workloads. Those rules are created in the Application Category of the Distributed Firewall.

Create Distributed Firewall Policies and Rules ​
- a Policy is a collection of firewall rules.
- a Rule defines if a packet should be allowed, dropped or rejected.
To create and manage your firewall rules and policies, you log in to the NSX UI.
- Navigate to Security > Policy Management > Distributed Firewall > Category Specific Rules > Application
- Click +ADD POLICY to create a Policy.
- Select a policy to add a new rule and click +ADD RULE.
- When the rule is ready to be published click the PUBLISH button.

When creating a firewall rule, the following parameters can be defined:
- Source and Destination: describe which sources and destinations the rule is applied to. It is recommended to use groups for the source and destination parameters.
- Services: define a port and protocol combination.
- Applied To: define the scope of the rule. It can be applied to the whole distributed Firewall or to specific groups. Unless the rule absolutely needs to be applied to all assets, limiting to specific groups should be chosen. The prior option requires more compute and strains the fabric limit, which is often unnecessary (e.g. when source and destination reside on just a single segment). If the source resides inside NSX and the destination outside, adding the source segment group is sufficient.
- Actions: Allow, Drop or Reject
- Allow: allows all traffic with the specified source, destination and protocol
- Drop: drops packets with the specified source, destination and protocol. This is a silent action.
- Reject: rejects packets with the specified source, destination and protocol. This action sends a destination unreachable message to the sender and is therefore a more graceful way to deny a packet.
The rules are evaluated sequentially from top to bottom. Each packet is checked against the first rule in the rule table before moving on to the following rules. Once a rule in the table matches the parameters, that rule is applied and the evaluation process ends. No further rules are checked or enforced. The order of the rules is therefore very important.
You can get more detailed information on the Distributed Firewall here:
Create Groups ​
A group is a collection of assets to which policies can be applied. Groups can serve as sources or destinations in firewall rule configurations. They can contain VMs, virtual interfaces (VIFs), segments, segment ports, as well as IP and MAC addresses. Membership can be defined either statically or dynamically, with tags used to enable dynamic membership.
To create a group, you log in to the NSX UI.
- Navigate to Inventory > Groups
- Click ADD GROUP
- Enter the name for your group and click Set under Compute Members.

- Select Membership Criteria to add dynamic members and click +ADD CRITERION
- A membership criterion can have one or more conditions.
- Multiple Criterias can be added.

- Select Members to add static members in the group

- To add IP or MAC addresses to the group, select the relevant tab and add the IP and/or MAC addresses.

- Click APPLY
- Click SAVE
Tags ​
In NSX, it is possible to tag virtual machines, segments, and segment-ports. Tags can then be used in Groups as a dynamic membership criteria.
You can tag objects by editing the object and adding the desired tag.
In this example to add a tag to an NSX Segment, navigate to Networking > Segments > NSX, edit the segment, add the tags and save the configurations.
To add tags to a specific VM and manage all the tags, navigate to Inventory > Tags.
Objects can have one or more tags.
You can get more information on Groups and Tags configuration on the Broadcom Documentation on Firewall Policy
