Handling incoming traps is the job of a “notification receiver“. The Net-SNMP suite include the tool ‘snmptrapd‘ to act in this role.
1. We need to configure the configuration file /etc/snmp/snmptrapd.conf for this requirement. The below example will accept traps for forwarding with the community string ‘public‘ and forward all traps to ‘finalsnmptrapdestserver‘ with community string public.
# vi /etc/snmp/snmptrapd.conf authCommunity net public forward default finalsnmptrapdestserver public
2. Forwarding notifications to another receiver would be done using similar ‘snmptrapd.conf’ directives:
forward .220.127.116.11.4.1.8072.4.0.3 10.0.0.1 forward default 10.0.0.2
3. On the external host that will receive the traps, make sure that the snmptrapd daemon is enabled and running by executing the following commands:
# chkconfig snmptrapd on # service snmptrapd start
For further information on processing SNMP notifications, see the snmptrapd.conf man page.
# man snmptrapd.conf