Hi Fortinet Community,
My team and I are trying to find the most efficient way to export the wan1 and wan2 IP addresses and subnets from our FortiGates to a spreadsheet. All sites are attached to FortiManager and FortiAnalyzer.
Locally on the FortiGate we can find it by:
show system interface wan1 | grep "set ip"
show system interface wan2 | grep "set ip"
Thank you
Nominating a forum post submits a request to create a new Knowledge Article based on the forum post topic. Please ensure your nomination includes a solution within the reply.
Hello Justin,
Thank you for using the Community Forum.
I will seek to get you an answer or help. We will reply to this thread with an update as soon as possible.
Regards,
Are all of the wan1 and wan2 interface IP addresses set manually? No DHCP?
Yes, if it is DHCP you have to use get system interface or either "get router info routing-table database" or "get router info routing-table all".
Great info.. how would we run this from FortiManager to print from all managed devices?
Correct, we have 300+ sites all with static IPs assigned to the WAN interfaces
I don't believe there is any way to do this programmatically with the FortiManager. You will have to script this using Ansible or other method like Python and related libraries.
:)
I think the remote should send it. How FortiManager will get it if the remot IP is not known. If FortiGate register to FortiManager it is oK. I am sorry, I did not work on FortiMnager since a long time and have very littel experience with it. But I worked with FortiAnalyzer and it gets a message of Unknown device when it tries to register for the first time.
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 |
---|---|
1662 | |
1077 | |
752 | |
446 | |
220 |
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 2024 Fortinet, Inc. All Rights Reserved.