Skip to main content
caunon
Staff
Staff
July 15, 2022

Technical Tip: How to delete all firewall policies ,VIPs (Virtual IPs) or firewall addresses to configure from scratch

  • July 15, 2022
  • 0 replies
  • 9453 views
Description

This article describes about situations, where one might delete all firewall policies, VIPs (Virtual IPs) or firewall addresses to re-create them again.

Scope FortiGate.
Solution

Deleting firewall policies, VIPs or firewall addresses one by one might take a lot of time, in cases where the configuration is huge.

Using the following CLI commands complete firewall config of respective fields can be deleted.


To delete all firewall policies:

 

FGT # config firewall policy
FGT (policy) # purge

This operation will clear all table!
Do you want to continue? (y/n)y

 

It is also possible to select all entries on the GUI by holding the 'Shift' key, selecting the first and last firewall policies, 'right-clicking' on any policy, and selecting Delete policy. The same procedure also applies to Virtual IPs and address objects. 

 

delete.PNG

 

 

To delete all VIPs (Virtual IPs):

 

FGT # config firewall vip
FGT (vip) # purge

This operation will clear all table!
Do you want to continue? (y/n)y

 

To delete all firewall addresses:

 

FGT # config firewall address
FGT (policy) # purge

This operation will clear all table!
Do you want to continue? (y/n)y

 

 

Notes:

  • Be careful while running the above CLI commands, as they will delete all related settings under that function permanently. 
  • Virtual IPs and address objects must be removed from all references; otherwise, it is not possible to delete them.