Usage: cli.py [-avs] File
Provided a list of ports or IPs & URLs, mass generate Fortigate firewall objects.
The input file can be either a .txt or .csv.
.txt files should contain only your entries, each on its own line, and no extra characters. A valid .txt entry is either an IP/CIDR (ex. 192.168.1.0/24), an IP/Netmask (ex. 192.168.1.0/255.255.255.0), a URL (ex. www.purple.com), or a valid port between 1-65535. Ports CANNOT be mixed with IPs & URLs.
.csv files should contain 5 fields. IP Address Fields:
- IP, IP/CIDR, IP/Netmask or URL
- Netmask (needed if you do not provide a CIDR in the previous field) (Optional)
- Interface to attach object to (Optional)
- Custom Name for the object (Optional)
- Comment to label the object (Optional)
Port Fields:
- A valid protocol (tcp/udp) or 'both' for tcp & udp.
- Destination port or port range (denoted with a -)
- Source port or port range (Optional)
- Custom name for the object (Optional)
- Comment to label the object (Optional)
.csv's should be formatted similarly to an Excel .csv
DISCLAIMER: If you run something on a firewall that you shouldn't have, we are NOT responsible. READ YOUR CODE BEFORE YOU PLACE IT!!!
Requires Python 3