Install SNMP and SNMP Utilities
Install SNMP and SNMP Utilities
Installing SNMP and some optional SNMP utilities is as simple as running one command:
yum -y install net-snmp net-snmp-utilsAdd a Basic Configuration for SNMP
Now, let’s take the default SNMP configuration file, /etc/snmp/snmpd.conf and move it to an alternate location, /etc/snmp/snmpd.conf.orig.
cp /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.orig
And now we’ll create a new /etc/snmp/snmpd.conf:
vi /etc/snmp/snmpd.conf##### First, map the community name "public" into a "security name"# sec.name source community#com2sec notConfigUser default publiccom2sec notConfigUser 192.168.74.0/24 publiccom2sec notConfigUser 192.168.74.0/24 w4ch1dc0nf1gCOmmunity##### Second, map the security name into a group name:# groupName securityModel securityNamegroup notConfigGroup v1 notConfigUsergroup notConfigGroup v2c notConfigUser
##### Third, create a view for us to let the group have rights to:
# Make at least snmpwalk -v 1 localhost -c public system fast again.# name incl/excl subtree mask(optional)view systemview included .1.3.6.1.2.1.1view systemview included .1.3.6.1.2.1.25.1.1##### Finally, grant the group read-only access to the systemview view.# group context sec.model sec.level prefix read write notifaccess notConfigGroup "" any noauth exact systemview none none# -----------------------------------------------------------------------------



Tidak ada komentar :
Posting Komentar