Support Forum
The Forums are a place to find answers on a range of Fortinet products from peers and product experts.
lfstudios10
New Contributor

Create a stitch that pings IP addresses that have been given out

Can anyone write me a script that will ping IP addresses the Fortigate has handed out when it hands them out?  Is that a variable that's accessible?  Running 6.4.9

12 REPLIES 12
lfstudios10

Anyone?

wasimc
New Contributor

From a general perspective the script will be simple:

1. get the output from the logs into a file

2. use a regular expression  match the string " LOG_ID_DHCP_ACK" in that file to identify the log that contains the newly assigned IP and use another regular expression to match the IP address handed out to the client. Store that IP into another variable.

3. ping that IP and print the output

lfstudios10

I don't even need the output in the last section.  Do you think you can provide the actual script please?

Labels
Top Kudoed Authors