FortiGate
FortiGate Next Generation Firewall utilizes purpose-built security processors and threat intelligence security services from FortiGuard labs to deliver top-rated protection and high performance, including encrypted traffic.
AndrewX
Staff
Staff
Article Id 337300
Description This article describes the issue when FortiGate is not responding to SNMP queries.
Scope FortiGatev7.4.x.
Solution

Possible Reason 1:
Background information:

Cisco Switch can talk to the SNMP server via the IPSec tunnel correctly whereas FortiGate cannot respond to SNMP server queries via the IPSec tunnel.

 

Network diagram:  

Cisco SW---FGT100F-----IPSec VPN------ SNMP server.

 

AndrewX_0-1724909265112.jpeg

 

 

  1. The packet sniffer shows the traffic comes in, but no return traffic.
                                    
AndrewX_1-1724909265118.jpeg

 

  1. Verify Routing configuration and firewall policy are all set up properly, as it is possible to see from the source IP in FortiGate can ping and traceroute to the SNMP server.
                                
AndrewX_2-1724909265121.jpeg

 

  1. Checked the local policy which allowed the source to the SNMP server.

AndrewX_3-1724909265123.jpeg

 

  1. Run the debug to capture the SNMP information, however, nothing is shown on the debugs.
                                     
AndrewX_4-1724909265124.jpeg

 

AndrewX_5-1724909265125.jpeg

 

Solution:

Add the SNMP server IP as a trusted host under the local admin account, and then it will start working.

Possible Reason 2:

Unable to match SNMP community on the FortiGate due to case-sensitive community name 

  • The SNMP community name specified on the SNMP manager is 'public'.
  • The SNMP community name specified on the FortiGate is 'Public'.

    config system snmp community
        edit 2
            set name "Public" <---
            set status enable
         next
      end

The FortiGate will not reply to the SNMP traffic coming from the SNMP manager as the community's name does not match as it is case-sensitive.

  • Run the snmpd debugs:

 

diag debug reset
diag debug application snmp -1

diag debug enable

Below debugs are expected:

  • snmpd: checking if community 'public' is valid
  • snmpd: failed to match community 'public'.

 

Solution:
Make sure the community's name is identical on both the SNMP manager and the FortiGate.