I have an issue with a customer that wants to import about 20k IP's into Fortigate. Until now he was using a Symantec to only allow access to these IP's, that have kept piling up for the last 10 years until they are about 30k of them. We will have to summarize and group them together into IP ranges until they reach the 20k address limit on the FG, but still, can anybody help me with a script to import so many IP's into FortiGate addresses so I can use them in a Policy?
I will mention that the customer does not want any other solution to the problem, he wants to import all these IP's.
You may try to create a text file like :
config firewall address edit "ipv4_11_11_1" set subnet 11.11.1.1 255.255.255.255 next edit "ipv4_11_11_2" set subnet 11.11.1.2 255.255.255.255 next edit "ipv4_11_11_3" set subnet 11.11.1.3 255.255.255.255 next ....
end
Then go to FGT (v5.4) GUI:System->Advanced->Configuration Scripts, click " Uploda and Run a new Script", it will import your address to FGT. Thanks.
A while ago I've posted a batch command file (Windows) for creating a command file from a list of IPs. Maybe this can help: https://forum.fortinet.com/tm.aspx?m=102532
Select Forum Responses to become Knowledge Articles!
Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.
User | Count |
---|---|
1748 | |
1114 | |
764 | |
447 | |
241 |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.