Description | This article describes how to use the SNMP feature on FortiGate when the SNMP request is on portA but the SNMP service is running on portB. |
Scope | FortiOS v6 and above |
Solution |
In this example, let's have a look into the scenario when an SNMP request is coming on the port3 interface but the SNMP service is running on the port1 interface.
SNMP server(172.31.143.202)--------------------------------------Port3(172.31.141.78)--Fortigate --Port1(10.5.29.78, snmp enabled on port1)
Configuration on Firewall:
config system snmp community
Initiated the snmpwalk but the packet will be dropped:
iron-kvm49 (root) # diagnose debug flow show function-name enable FGT(root) # FGT(root) # diagnose de flow filter port 161 FGT(root) # diagnose debug flow trace start 1000 FGT (root) # diagnose de enable FGT (root) # id=65308 trace_id=314 func=print_pkt_detail line=5842 msg="vd-root:0 received a packet(proto=17, 172.31.143.202:51501->10.5.29.78:161) tun_id=0.0.0.0 from port3. "
Note. Here, the packet is getting dropped because the packet is coming on Port3 but SNMP destination is Port1.
Solution:
As SNMP traffic is for different interfaces, it is mandatory to create a Firewall Policy and allow SNMP traffic.
Policy configuration:
config firewall policy
Now initiate the SNMP traffic and SNMP polling is getting successful:
If the issues are persistent, collect the below output and share it with TAC for further assistance.
Terminal 1:
diag debug application snmpd -1 diag debug enable
Terminal 2:
diag sniffer packet any "port 161 or 162" 6 0 l |
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.