SNMP configuration with basic security on CentOS 6
- Install net-snmp-utils package by "yum install net-snmp-utils" command
- Then Enter the /etc/snmp/ directory and rename original snmpd.conf file by "mv snmpd.conf snmpd.conf.orig"
- Create a new file by using vi/vim or touch or any other command.
- Configure by below format where first 3 line mapped the community with security name and restrict IP addresses only who can get or access SNMP.
- Fourth line map the Security name with Group name and define security model such V1, V2c or V3 etc.
- Fifth line Creates view for defining right .
- Sixth line define grant the group read-only access
- Seventh and Eighth line defines just information.
#Map the community name "hello" into a security name "OwnNMS"
com2sec OwnNMS 127.0.0.1 hello
com2sec OwnNMS 192.168.0.0/24 hello
com2sec OwnNMS 192.168.5.0/24 hello
#Map the security name into a group name
group OWNICT v2c OwnNMS
#Create a view for us to let the group have rights to
view Systemv included .1
#Grant the group read-only access to the Systemv view
access OWNICT "" any noauth exact Systemv none none
syslocation ICT-Server-Room
syscontact Hadiuzzaman (+8801911355810)