Skip to main content
JJones_VillageMD
New Member
December 22, 2022
Question

Export WAN1 and WAN2 IP addresses from all FortiGates to spreadsheet

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

8 replies

Anthony_E
Staff
Staff
December 25, 2022

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,

Best Regards
gfleming
Staff
Staff
December 27, 2022

Are all of the wan1 and wan2 interface IP addresses set manually? No DHCP?

Mohamed_Gaber
Explorer III
December 27, 2022

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".

JJones_VillageMD
New Member
December 27, 2022

Great info.. how would we run this from FortiManager to print from all managed devices?

Mohamed_Gaber
Explorer III
December 27, 2022

Mohamed_Gaber_0-1672163333686.png

 

Mohamed_Gaber
Explorer III
December 27, 2022

:)

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.

Thought Leadership. Security Summit. Thursday, November 12th, PGA National Resort, Palm Beach Gardens, FL.
Thought Leadership. Security Summit. Thursday, October 8th. Disney's Grand Californian Hotel & SPA, Anaheim, CA.
Security Operations Summit: Modernize SecOps. Operate AI-Native.AMER: November 4 | 9:00 AM PST. India and SAARC: November 5 | 10:00 AM IST. EMEA: November 5 | 10:30 AM CET. APAC: November 5 | 11:00 AM SGT