##sec.name source community
com2sec notConfigUser default public
com2sec local 127.0.0.1 public
com2sec network_1 10.1.230.0/24 public
com2sec network_2 10.1.231.0/24 public
#com2sec为固定值,network_2为属组,10.1.230.0/24为可以访问这台机器的主机,public为密钥.
# Second, map the security name into a group name
group notConfigGroup v1 notConfigUser
group notConfigGroup v2c notConfigUser
#group定义组,notConfigGroup为组名,v1为协议,notConfigUser为用户名,要与上面定义的一至.
# name incl/excl subtree mask(optional)
view systemview included .1.3.6.1.2.1.1
view systemview included .1.3.6.1.2.1.25.1.1
#name读取哪方面的数据,incl/excl两个选项included是包含,excluded为不包含.subtree为snmpwalk可以访问到哪个子树哪个叶子.mask为可选
项
access notConfigGroup "" any noauth exact all none none
view all included .1 80
access MyROGroup "" any noauth exact all none none
access MyRWGroup "" any noauth exact all all all
syslocation Unknown (edit /etc/snmp/snmpd.conf)
syscontact Root <root@localhost> (configure /etc/snmp/snmp.local.conf)
dontLogTCPWrappersConnects yes