I used the ExportImportPolicyPackage method and it worked for me.
Download the files from here:
Download and Copy these files to the cp-mgmt-api blank folder you downloaded earlier.
Run this cmd : api start
Make sue API status is running, run this cmd:
api status
Create a directory
/opt/CPsuite-R80/fw1/Python/bin/python2.7 /home/admin/APIpython/ExportImportPolicyPackage-master/import_export_package.py
Ex: [Expert@gw-bd57f0:0]# /opt/CPsuite-R80/fw1/Python/bin/python2.7 /home/admin/APIpython/ExportImportPolicyPackage-master/import_export_package.py
Welcome to the Policy Package Import/Export Tool.
What would you like to do?
1. Import a package
2. Export a package
99. Exit
2
Please enter a Policy Package name to export:
Standard
Please select a login method:
1. Enter user credentials manually
2. Login as Root
3. Use an existing session file
4. Use an existing session UID
99. Back
1
The script will run with the following parameters:
Export Access-Control layers = True
Export Threat-Prevention layers = False
Output-file name = None
Management Server IP = 127.0.0.1
Management Server Port = 443
Management Server Domain = None
1. Change Settings
2. Run
99. Back
1
Please select a setting to change:
1. Disable export of Access-Control Rulebases
2. Enable export of Threat-Prevention Rulebases
3. Output file name
4. Change Management Server IP
5. Change Management Server Port
6. Change the domain name
99. Back
2
Exporting of Threat-Prevention layers enabled
The script will run with the following parameters:
Export Access-Control layers = True
Export Threat-Prevention layers = True
Output-file name = None
Management Server IP = 127.0.0.1
Management Server Port = 443
Management Server Domain = None
1. Change Settings
2. Run
99. Back
2
Please enter your username:
admin
Please enter your password: *******
Exporting Access Control layers
Exporting Access Layer [Network]
Retrieved 50 out of 87 rules (57%)
Retrieved 87 out of 87 rules (100%)
Processing rules and sections
Exporting access-roles from layer [Network]
Exporting services-udp from layer [Network]
Exporting groups from layer [Network]
Exporting hosts from group [Static.IPs]
Exporting hosts from group [Static.Limited.Internet]
Exporting networks from group [Static.Limited.Internet]
Exporting networks from layer [Network]
Exporting simple-gateways from layer [Network]
Exporting services-tcp from layer [Network]
Exporting hosts from layer [Network]
Exporting access rules from layer [Network]
Exporting access sections from layer [Network]
Exporting placeholders for unexportable objects from layer [Network]
Exporting layer settings of layer [Network]
Done exporting layer 'Network'.
Exporting Access Layer [Application]
Retrieved 17 out of 17 rules (100%)
Processing rules and sections
Exporting access-roles from layer [Application]
Exporting services-udp from layer [Application]
Exporting networks from layer [Application]
Exporting application-site-groups from layer [Application]
Exporting applications-sites from group [FaceBook_Group]
Exporting services-tcp from layer [Application]
Exporting hosts from layer [Application]
Exporting applications-sites from layer [Application]
Exporting application-site-categories from layer [Application]
Exporting access rules from layer [Application]
Exporting access sections from layer [Application]
Exporting placeholders for unexportable objects from layer [Application]
Exporting layer settings of layer [Application]
Done exporting layer 'Application'.
Exporting NAT policy
Getting information from show-nat-rulebase
Retrieved 50 out of 94 rules (53%)
Retrieved 94 out of 94 rules (100%)
Processing rules and sections
Exporting hosts
Exporting networks
Exporting NAT rules
Exporting placeholders for unexportable objects from NAT rulebase
Done exporting NAT rulebase.
Exporting Threat-Prevention layers
Exporting Threat Layer [IPS]
Retrieved 1 out of 1 rules (100%)
Processing rules and exceptions
Exporting Exception-Rulebase from Threat-Rule #1 in Threat-Layer[IPS]
Retrieved 10 out of 10 rules (100%)
Processing exceptions
Exporting hosts from layer [IPS]
Exporting groups from layer [IPS]
Exporting networks from group [VPNDomain]
Exporting networks from layer [IPS]
Exporting simple-gateways from layer [IPS]
Exporting threat exceptions from layer [IPS]
Exporting placeholders for unexportable objects from layer [IPS]
Exporting layer settings of layer [IPS]
Done exporting layer 'IPS'.
Exporting simple-gateways from layer [IPS]
Exporting threat-profiles from layer [IPS]
Exporting threat rules from layer [IPS]
Exporting Exception-Groups used in layer [IPS]
Exporting placeholders for unexportable objects from layer [IPS]
Exporting layer settings of layer [IPS]
Done exporting layer 'IPS'.
Exporting Threat Layer [Standard Threat Prevention]
Retrieved 1 out of 1 rules (100%)
Processing rules and exceptions
Exporting Exception-Rulebase from Threat-Rule #1 in Threat-Layer[Standard Threat Prevention
Retrieved 3 out of 3 rules (100%)
Processing exceptions
Exporting hosts from layer [Standard Threat Prevention]
Exporting networks from layer [Standard Threat Prevention]
Exporting threat exceptions from layer [Standard Threat Prevention]
Exporting placeholders for unexportable objects from layer [Standard Threat Prevention]
Exporting layer settings of layer [Standard Threat Prevention]
Done exporting layer 'Standard Threat Prevention'.
Exporting threat-profiles from layer [Standard Threat Prevention]
Exporting threat rules from layer [Standard Threat Prevention]
Exporting Exception-Groups used in layer [Standard Threat Prevention]
Exporting placeholders for unexportable objects from layer [Standard Threat Prevention]
Exporting layer settings of layer [Standard Threat Prevention]
Done exporting layer 'Standard Threat Prevention'.
Created Filename:
exported__package__Standard__2018_07_23_13_41.tar.gz
To import, copy the file to the new server and follow the same process from the menu based & choose option #1
Pablo Suarez | Senior Security Analyst | The Teneo Group