Convert SNMP traps from v1 to v3 -
i'm trying convert snmp v1 traps v3. i've followed this discussion it's vague. i've looked here without success.
to more clear: have centos 6 station, net-snmp 5.5 on it. need generate v1 traps, receive them, convert them v3, forward them.
regarding first guide, managed far:
master:
snmpd -lo --master=agentx --agentxsocket=tcp:192.168.58.64:42000 udp:1161
listen:
snmpwalk -v3 -u snmpv3user -a snmpv3pass -a md5 -l authnopriv 192.168.58.64:1161
later edit:
i have made progress, able run snmpd master, connect snmptrapd agent it, have v1 traps mechanism functional.
i did following:
in order snmptrapd connected subagent snmpd need following: ###1 edit /etc/hosts.allow , add snmpd: $(your_ip) smptrapd: $(your_ip) important because snmptrapd fails silently if rejected tcp wrap. ###2 edit /etc/snmp/snmpd.conf , add @ bottom of other com2sec directives. com2sec infwnet $(your_ip) your-community add these lines group myrogroup v1 infwnet group myrogroup v2c infwnet group myrogroup usm infwnet under "# second, map security names group names:" add view @ bottom of other views view included .1 80 add group acces @ bottom of other group access directives access myrogroup "" noauth exact none none add line well: master agentx ###3 test this: snmpwalk -v1 -c your_community $(your_ip) . ###4 create following trap test example: touch /usr/share/snmp/mibs/ucd-trap-test-mib.txt ###5 copy paste text below it: ucd-trap-test-mib definitions ::= begin imports ucdexperimental ucd-snmp-mib; demotraps object identifier ::= { ucdexperimental 990 } demotrap trap-type enterprise demotraps variables { syslocation } description "an example of smiv1 trap" ::= 17 end ###6 edit /etc/sysconfig/snmptrapd (not /etc/default/snmptrapd !!) replace options this: options="-lsd -m -m /usr/share/snmp/mibs -p /var/run/snmptrapd.pid" ###7 test snmptrap -v 1 -c public $(your_ip) ucd-trap-test-mib::demotraps "" 6 17 "" snmpv2-mib::syslocation.0 s "just here"
now need find way convert them v3 , read/receive them remote snmpd
Comments
Post a Comment