This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
aix:snmp_config [2023/07/26 13:54] manu |
aix:snmp_config [2023/08/18 13:32] (current) manu [SNMPv1 / 2c public] |
||
|---|---|---|---|
| Line 71: | Line 71: | ||
| </cli> | </cli> | ||
| - | Test | + | **Test** |
| + | |||
| + | AIX command | ||
| + | <cli prompt='>'> | ||
| + | root@aixtest /etc> /usr/sbin/snmpinfo -m dump -c public -h aixtest | ||
| + | 1.3.6.1.2.1.1.1.0 = "IBM PowerPC CHRP Computer | ||
| + | Machine Type: 0x0800004c Processor id: 00C2xxx04B00 | ||
| + | Base Operating System Runtime AIX version: 07.02.0005.0203 | ||
| + | ... | ||
| + | </cli> | ||
| + | |||
| + | Linux command (from snmp-utils rpm) | ||
| <cli prompt='>'> | <cli prompt='>'> | ||
| root@aixtest /etc> snmpwalk -v2c -m all -c public aixtest sysName.0 | root@aixtest /etc> snmpwalk -v2c -m all -c public aixtest sysName.0 | ||
| Line 79: | Line 90: | ||
| </cli> | </cli> | ||
| + | To filter on a specific IP change the string **COMMUNITY**, with IP or subnet | ||
| + | Ex: | ||
| + | COMMUNITY public public noAuthNoPriv 10.10.10.10 255.255.255.255 - | ||
| + | |||
| + | or range, | ||
| + | Ex: | ||
| + | COMMUNITY public public noAuthNoPriv 172.10.0.0 255.255.0.0 - | ||
| + | |||
| + | |||
| + | === To change community public === | ||
| + | |||
| + | Change the lines with the new community string, here public is replaced by Str0ngC0mmunity: | ||
| + | <code> | ||
| + | VACM_GROUP group1 SNMPv1 Str0ngC0mmunity - | ||
| + | COMMUNITY Str0ngC0mmunity Str0ngC0mmunity noAuthNoPriv 0.0.0.0 0.0.0.0 - | ||
| + | VACM_GROUP director_group SNMPv2c Str0ngC0mmunity - | ||
| + | </code> | ||
| + | |||
| + | You then need to stop the daemons: | ||
| + | <code> | ||
| + | stopsrc -s aixmibd | ||
| + | stopsrc -s hostmibd | ||
| + | stopsrc -s snmpmibd | ||
| + | stopsrc -s snmpd | ||
| + | </code> | ||
| + | |||
| + | To start the daemons, execute the following commands using the new community string: | ||
| + | <code> | ||
| + | startsrc -s aixmibd -a "-c Str0ngC0mmunity" | ||
| + | startsrc -s hostmibd -a "-c Str0ngC0mmunity" | ||
| + | startsrc -s snmpmibd -a "-c Str0ngC0mmunity" | ||
| + | startsrc -s snmp | ||
| + | </code> | ||
| ===== SNMPv3 public ===== | ===== SNMPv3 public ===== | ||