Difference between revisions of "Snmptrap"

From UVOO Tech Wiki
Jump to navigation Jump to search
Line 13: Line 13:
 
```
 
```
 
snmptrap -v 3 -n "" -a SHA -A mypassword -x AES -X mypassword -l authPriv -u traptest -e 0x8000000001020304 127.0.0.1 0 iso.3.6.1.6.3.1.1.5.2
 
snmptrap -v 3 -n "" -a SHA -A mypassword -x AES -X mypassword -l authPriv -u traptest -e 0x8000000001020304 127.0.0.1 0 iso.3.6.1.6.3.1.1.5.2
 +
```
 +
 +
You must use engineids
 +
```
 +
https://networkengineering.stackexchange.com/questions/32310/how-to-receive-snmp-v3-traps-without-specific-enginedid
 +
You cannot be authenticated as user for receiving traps if you don't specify the engineID.
 +
See http://www.net-snmp.org/wiki/index.php/TUT:Configuring_snmptrapd_to_receive_SNMPv3_notifications
 
```
 
```
  

Revision as of 19:09, 5 November 2020

/tmp/snmptrapd.conf

createUser -e 0x8000000001020304 traptest SHA mypassword AES mypassword
authuser log traptest
snmptrapd -f -C -c /tmp/snmptrapd.conf -Le
snmptrap -v 3 -n "" -a SHA -A mypassword -x AES -X mypassword -l authPriv -u traptest -e 0x8000000001020304 127.0.0.1 0 iso.3.6.1.6.3.1.1.5.2

You must use engineids

https://networkengineering.stackexchange.com/questions/32310/how-to-receive-snmp-v3-traps-without-specific-enginedid
You cannot be authenticated as user for receiving traps if you don't specify the engineID.
See http://www.net-snmp.org/wiki/index.php/TUT:Configuring_snmptrapd_to_receive_SNMPv3_notifications

Get engineid for -e option 0x8000000001020304

tshark -V -i eth0 -f "host 10.x.x.x" -d tcp.port==162,snmp | grep -i msgAuthoritativeEngineID