| 15 | |
| 16 | == SNMPv3 send trap == |
| 17 | |
| 18 | At server, we edit file /etc/snmp/snmptrapd.conf |
| 19 | {{{ |
| 20 | #!sh |
| 21 | [root@mini snmp]# more snmptrapd.conf |
| 22 | # use for response to snmpwalk/snmpget with community "public" |
| 23 | authCommunity log,execute,net public |
| 24 | |
| 25 | # use for daemon waiting to receive snmptrap v3 |
| 26 | disableAuthorization yes |
| 27 | traphandle default /usr/sbin/snmptthandler |
| 28 | createUser -e 0x090807060504030201 the_user_name SHA the_SHA_string AES the_AES_string |
| 29 | authUser log,execute,net the_user_name |
| 30 | }}} |
| 31 | |
| 32 | Then we run snmpd waiting for trap |
| 33 | {{{ |
| 34 | #!sh |
| 35 | |
| 36 | [root@mini snmp]# snmptrapd -f -Le |
| 37 | NET-SNMP version 5.7.3 |
| 38 | |
| 39 | }}} |
| 40 | On client that we would like to send trap to server run following command |
| 41 | {{{ |
| 42 | #!sh |
| 43 | [krit@mini ~]$ snmptrap -v 3 -e 0x090807060504030201 -u the_user_name -a SHA -A the_SHA_string -x AES -X the_AES_string -l authPriv localhost '' 1.3.6.1.4.1.8072.2.3.0.1 1.3.6.1.4.1.8072.2.3.2.1 i 123456 |
| 44 | }}} |