Skip to main content
dbhavsar
Staff
Staff
Jan 3, 2024 5:43 PM UTC

Technical Tip: Cloning objects, policies, and UTM profiles using the CLI

Description This article describes how to clone objects, policies, and UTM profiles using the CLI.
Scope FortiOS.
Solution
  1. Clone the firewall policy using the following command:

config firewall policy

clone <policy_id> to <new_policy_id>

 

For example:

 

config firewall policy

clone 98 to 20

end


clone-policy.jpg
Note: The cloned policy status will also be cloned. Disable it before cloning or, if it will not impact the production, clone without disabling it.

 

  1. Clone the UTM profiles:

config <dnsfilter/ web-filter/ antivirus> profile

clone <existing-profile-name> to <new_profile_name>

Example for web-filter profile:

 

config webfilter profile

clone wifi-default to cloned-new

end

 


cloned-web-filter.jpg
Note: The references from the existing profile will not be cloned. It will be '0' for cloned profiles.

 

It is also possible to clone custom services, local-in-policies, application control, and remaining UTM profiles.

    Risk and Resilience in the Age of AI. An OT Thought Leadership Summit for Houston's Critical Infrastructure Leaders. Date: Thursday, December 3, 2026. Time: 8:30 am - 1:30 pm (CT). Location: The Westin Houston, Memorial City | 945 Gessner Road, Houston, TX 77024