This tool helps in bulk creation of URL and Network objects in Cisco Firepower Device Manager (FDM) through its REST API. A bulk object creation utility is usually a requirement to avoid manual GUI-based object creation which is time-consuming and error-prone when dealing with multiple objects.
Technology Stack: Python 3.x, Cisco FDM REST API
Status: Production Ready - v1.0
The tool is developed to address the concern of bulk creation of URL and Network objects in Cisco Firepower Device Manager (FDM). Network administrators often need to add multiple URL and network objects to FDM for policy enforcement and traffic management. Manually creating these objects through the GUI is time-consuming and error-prone, especially when dealing with dozens or hundreds of objects.
This tool solves that problem by:
Benefits:
Requirements for installation:
pip3 install requests
pip3 install urllib3
Or alternatively you can use the command below to download dependencies via the requirements.txt file, this has to be executed from the downloaded script directory:
pip3 install -r requirements.txt
Create two text files in the same directory as the script:
url.txt - One URL per line:
google.com
facebook.com
github.com
ip.txt - One IP address per line:
192.168.1.100
10.0.0.50
172.16.1.25
Once the dependencies are installed and the code is pulled from GitHub, it is good to go. Below mentioned are the steps to follow in order to execute it:
Create two text files in the same directory as the script:
url.txt - One URL per line:
google.com
facebook.com
github.com
ip.txt - One IP address per line:
192.168.1.100
10.0.0.50
172.16.1.25
In order to execute the script, run the below command:
python3 fdm_object_adder.py
Once the script is executed, you will be prompted to enter FDM connection details:
FDM IP: 192.168.1.10
Username: admin
Password: [hidden]
Once the credentials are entered, the script connects to the FDM and processes the input files:
============================================================
║ ║
║ FDM Object Adder ║
║ ║
║ • Creates URL objects from url.txt ║
║ • Creates Network objects from ip.txt ║
║ ║
============================================================
Authentication successful
Processing url.txt: 5 URLs
SUCCESS: google_com
SUCCESS: facebook_com
SUCCESS: github_com
Processing ip.txt: 3 IPs
SUCCESS: Host_192_168_1_100
SUCCESS: Host_10_0_0_50
SUCCESS: Host_172_16_1_25
Completed: 8 objects created
The script automatically sanitizes names to ensure FDM compatibility:
URL Objects: Domain names with special characters replaced by underscores
google.com
→ google_com
sub.domain.com
→ sub_domain_com
Network Objects: IP addresses with dots replaced by underscores and "Host_" prefix
192.168.1.100
→ Host_192_168_1_100
10.0.0.50
→ Host_10_0_0_50
Currently the tool supports basic URL and Network object creation. The below fields/features are not supported currently:
The next version of the tool/utility will have the following items included:
If you encounter issues:
This project follows security best practices:
We welcome contributions! Please see CONTRIBUTING.md for details on:
git checkout -b feature/amazing-feature
pip install -r requirements.txt
python -m pytest
(when available)The project includes automated testing via GitHub Actions:
pip install -r requirements.txt
For contributors and developers:
pip install pytest flake8 black # Development tools
This project was written and is maintained by the following individuals:
• Anvesh Pathak - anvpatha@cisco.com
Contributions are welcome! Please feel free to submit pull requests or open issues for:
This project is licensed under the MIT License. See LICENSE file for details.
This tool is designed to work with Cisco Firepower Device Manager and has been tested with FDM versions 7.2 and above.
Owner
Contributors
Categories
Products
Secure FirewallProgramming Languages
PythonLicense
Code Exchange Community
Get help, share code, and collaborate with other developers in the Code Exchange community.View Community