Random Project

Fortigate ifName hack

I’ve been using the script for many years across various networking devices successfully. However I tried it against a new Foritgate 100F Firewall (FortiOS 6.4.7) and it wouldn’t find any of the interfaces by name. It would just return:
ERROR : Unknown interface

snmpwalk revelled that the interface names were under ifName OID 1.3.6.1.2.1.31.1.1.1.1 rather than ifDescr OID 1.3.6.1.2.1.2.2.1.2

So I made a copy of the script and changed the $descr_table variable to this:
my $descr_table = ‘1.3.6.1.2.1.31.1.1.1.1’;

And bingo. Now it’s working with this Fortigate.