Skip to main content

VMware on AWS - How to restore NSX DFW firewall rules to previous state

Customers who uses NSX day-in, day-out would like to have a point-in time restore functionality of DFW firewall rules. Many customer have a large footprints in VMC and make changes to DFW quite often.

This feature was missing for long time and we could see its included in recent versions . Let's see how DFW configuration roll back works 

NSX DFW configuration has versioning, and it is stored in the NSX Manager.  Every time when someone update DFW configuration, NSX creates one more version but keep storing the previous ones. You can rollback for previous config but reapplying it once again. 

You can find the options under Networking & Security tab, > Security > Distributed Firewall. In the right side we see an Actions drop down. Choose View to get to the below screen. 



Let’s go through the use case: 

  • 1. Original state- default config with no custom rules: 
  • a. There are no saved configurations during last 30 days:



In my existing test setup, with the current setting everything works well. The test vms are able to ping each other. 



  • 2. New configuration : Let's go ahead and create new rules 
  • 1. Create a new rule to reject the traffic from VM 172.16.30.11. 



As we see in the screenshot the traffic from the VM is now rejected .  Let's try to ping test and confirm the same. 



Let's go to Actions and View the saved configurations. 

In the screen we see a dot with and when we place the cursor on the dot we get to see when the last rule update was done. Look at the time of the change and click on the rule Name 



When we open the last draft , a new window appears with more details. As we see the last change was done by the user " userid" and also the time stamps. 






Expand the lower section under Draft changes to check the rule details : 



The rule what we added shows up here. 

Let's create another policy and a rule for a demo purpose. 


Now we see a new rule Change-2 as well as the Change-1. Let's review the configuration changes snapshot under Actions, > View.  



Let say the changes we made is wrong and impacting the pings. And we decide to roll back to the previous state. 

A. Go to Actions and under View choose the state we need to go back to. In our case its the first dot ( confirm the time lines as well). 




Here we should see 2 Firewall config and 2 Policy ( 1 we added to reject and another one to demo) . Both the policies and rules will be deleted  - 4 in total ( going to exact previous state - before state). 

Push “Load” and revert configuration to the last known-good state before these changes: When below screen appears , click on Load 



In the next screen we could see the state as exactly as previous one. We need to publish them to make it effect. ( click publish) 




Now check the connectivity of the VMs are restored to the original state. 





Other Options : 

Under Actions > click on Save > 

This option helps to store the state of the DFW firewall. We can use this option before making any major changes ( like before change management window). This helps to restore to the previous state if the Change fails. 




And we could see a dot with Star - highlight helps to fetch the details without opening multiple dots. 




FAQ: Service disruptions:

 Rollback of NSX rules is the same process as applying new (or change) DFW rules. I.e., underneath, each ESXi host will get a new list of rules, which corresponds to the ones at the time we are doing the roll back. 

This will lead to the fact that if some other rules (let's call them, useful and valid) were created from the point we want to go back to, they too will be revoked. And consequently, the traffic that was going through them will stop going through right after the rollback. For this reason, before doing a rollback, it is worth looking at all the changes that have happened since then and fixing (cloning/exporting) the "useful" rules. And add them again after you do the rollback. 




Popular posts from this blog

Fixing Tanzu Kubernetes Pod to External Services Connectivity Issues with NSX-T

Fixing Tanzu Kubernetes Pod to External Services Connectivity Issues with NSX-T Last month I got a call from a customer who was pulling their hair out over a networking issue. They had just deployed VMware Tanzu Kubernetes Grid on their vSphere with Tanzu environment, everything looked good in the dashboards, all pods were running, but their applications inside the pods could not reach external databases running on traditional VMs in the same datacenter. The frustrating part was that some pods could reach external services perfectly fine, while others would just timeout. There was no clear pattern. Let me tell you how we figured this out and fixed it. The Initial Problem Here is what the customer setup looked like: vSphere 8.0 with Tanzu enabled NSX-T 4.1.2 for networking Three Tanzu Kubernetes clusters running different microservices applications External PostgreSQL database running on traditional VMs (non-Kubernetes) External API services running on another se...

Troubleshooting vSAN Storage Policy Migration Failures in VMware Cloud Foundation 9.0

Recently I had a customer who migrated their VMware infrastructure from vSphere 7.0 to VMware Cloud Foundation 9.0. After the migration, they wanted to update their vSAN storage policies to take advantage of the new vSAN ESA (Express Storage Architecture) features. However, when they tried to change the storage policy for their production VMs, the operation kept failing with a cryptic error message. The error they were getting was: "Cannot complete operation due to insufficient resources to satisfy current storage policy." This was strange because they had plenty of disk space available. The vSAN cluster was only at 45% capacity, and all the hosts were healthy. Let me walk through how we troubleshooted and fixed this issue. Understanding the Problem First, let's understand what was happening in their environment: They had a 6-node vSAN cluster running VCF 9.0 vSAN was configured with the new ESA architecture They were trying to migrate VMs fro...

Unlocking VMware Cloud Foundation 9.0: A Strategic Blueprint for Enterprise Transformation

The evolution of VMware under Broadcom represents not disruption, but clarification—a focused vision toward unified private cloud excellence. As organizations navigate this transformation, the opportunity has never been greater to build truly modern, efficient, and powerful infrastructure with VMware Cloud Foundation. After architecting VMware solutions across diverse enterprise environments, I've observed a pattern: organizations that embrace VMware Cloud Foundation (VCF) strategically—rather than viewing the transition as a burden—emerge with significantly more capable, cost-effective, and future-ready infrastructure. This post shares a practical framework for successfully modernizing your VMware environment, maximizing your investment, and positioning your organization for the AI-driven, cloud-native future. Understanding the VMware Cloud Foundation Vision Let's start with clarity about what Broadcom and VMware are building: VMware Cloud Foundati...