vi /etc/snmp/snmpd.conf
com2sec notConfigUser default public
com2sec local localhost public
com2sec mynetwork 192.168.1.0/24 nsm01
com2sec mytpnetwork 192.168.0.0/24 nms02
group MyRWGroup v1 local
group MyRWGroup v2c local
group MyROGroup v1 mynetwork
group MyROGroup v2c mynetwork
group MyROGroup v1 mytpnetwork
group MyROGroup v2c mytpnetwork
view systemview included .1.3.6.1.2.1.1
view systemview included .1.3.6.1.2.1.25.1.1
access notConfigGroup "" any noauth exact systemview none none
view all included .1 80
access MyROGroup "" any noauth prefix all none none
access MyRWGroup "" any noauth prefix all all all
syslocation New Taipei City, Taiwan
syscontact InfoTech <[email protected]>
systemctl restart snmpd
systemctl enable snmpd