Page 1 of 1
Receiving SNMP V3 traps
Posted: Mon Feb 13, 2017 10:57 pm
by rajasegar
Hi,
Does SNMP V3 traps require different setup compared to SNMP V2?
Anyone can confirm this?
Thanks
Re: Receiving SNMP V3 traps
Posted: Tue Feb 14, 2017 10:09 am
by ssax
You need to configure snmptrapd to accept SNMPv3 traps or informs, add something like this to the bottom of your /etc/snmp/snmptrapd.conf:
For SNMPv3 informs:
Code: Select all
createUser snmpv3informuser SHA 'authpass' AES 'privpass'
authUser log,execute,net snmpv3informuser
Now restart snmptrapd:
You can then test it out from the command line and you should see it show up in /var/log/messages:
Code: Select all
snmpinform -v 3 -u snmpv3informuser -a SHA -A authpass -x AES -X privpass -l authPriv localhost 42 coldStart
For SNMPv3 traps:
Code: Select all
createUser -e 0x8000000001020304 snmpv3trapuser SHA 'authpass' AES 'privpass'
authUser log,execute,net snmpv3trapuser
Now restart snmptrapd:
You can then test it out from the command line and you should see it show up in /var/log/messages:
Code: Select all
snmptrap -v 3 -n "" -a SHA -A 'authpass' -x AES -X 'privpass' -l authPriv -u snmpv3trapuser -e 0x8000000001020304 localhost 0 coldStart
Taken and adjusted from here:
- Read here for more information but you should only put any configuration in /etc/snmp/snmptrapd.conf (ignore the files listed in the guide).
http://www.net-snmp.org/wiki/index.php/ ... ifications
Re: Receiving SNMP V3 traps
Posted: Tue Feb 14, 2017 8:39 pm
by rajasegar
Thanks ssax for the detailed help.
It is working fine using the test scripts.
You can close this up now.