Asterisk snmp: Unterschied zwischen den Versionen
Aus metasec wiki
Admin (Diskussion | Beiträge) (Die Seite wurde neu angelegt: „apt-get install snmp snmpd /etc/default/snmpd <pre> # This file controls the activity of snmpd and snmptrapd # MIB directories. /usr/share/snmp/mibs is the def…“) |
(kein Unterschied)
|
Version vom 11. März 2010, 19:53 Uhr
apt-get install snmp snmpd
/etc/default/snmpd
# This file controls the activity of snmpd and snmptrapd # MIB directories. /usr/share/snmp/mibs is the default, but # including it here avoids some strange problems. export MIBDIRS=/usr/share/snmp/mibs # snmpd control (yes means start daemon). SNMPDRUN=yes # snmpd options (use syslog, close stdin/out/err). SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid ' # snmptrapd control (yes means start daemon). As of net-snmp version # 5.0, master agentx support must be enabled in snmpd before snmptrapd # can be run. See snmpd.conf(5) for how to do this. TRAPDRUN=yes # snmptrapd options (use syslog). TRAPDOPTS='-a -Lsd -p /var/run/snmptrapd.pid'
/etc/snmp/snmpd.conf
rocommunity public master agentx agentXSocket /var/run/agentx agentXPerms 0660 0550 root root com2sec local 192.168.199.253 public com2sec mynetwork0 192.168.199.0/24 public group MyROGroup any local group MyROGroup any mynetwork0 view all included .1 access MyROGroup "" any noauth 0 all none none # Asterisk user rwuser asteriskUser priv createUser asteriskUser SHA hallo123 DES
/etc/asterisk/res_snmp.conf
[general] subagent = yes enabled = yes
asterisk neu starten!!! vorsicht nicht im laufenden betrieb
testen
snmpwalk -v 2c -c public localhost asterisk
wenn was zurückkommt dann läuft alles :->