SNMP (Simple networkmanagement Protocol): Easy Network Management Protocol
The case is listed as Linux Environment Construction ( CentOS-6 )
Use Yum to install:
Yum Install-y Net-snmp
Review the network configuration when the installation is complete:
Netstat-anupl
Confirm 161 The port is being monitored. To edit a firewall release port:
Vi/etc/sysconfig/iptables
Add to:
-A input-m state--state new-m udp-p udp--dport 161-j ACCEPT
save exit and restart iptables Span style= "font-family: ' The song Body '; Color:rgb (51,51,51); background: #FFFFFF;" > service. Note: is using the Span style= "font-family:arial, Sans-serif;" >UDP
Next Configure SNMP :
Vi/etc/snmp/snmpd.conf
1 , mark a common name that enters a security name
# First, map the community name "public" into a "security name" # Sec.name source Communitycom2sec Notconfigu Ser default public
Changing the source to a fixed IPallows only that IP access, while a network segment allows access to a network segment, and multiple data can be added to allow more than one IP access.
2. Add the security name to the group
# Second, map the security name into Agroup name:# groupName Securitymodel securitynamegroup Notconfiggrou P v1 notconfigusergroup notconfiggroup v2c notconfiguser
3. Define a viewable range
# Third, create a view Forus to let the group has rights to:# make in least snmpwalk-v 1 localhost-c public system FAs tagain.# 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.1view all included. 1
Mask (optional) is the value of the OID that corresponds to an object in the system that represents the allowed access . 1 below all nodes.
4 , defining the group's View permissions for operations under
# Finally, grant the group Read-only accessto the SystemView view.# Group context Sec.model Sec.level prefix Read Write notifaccess notconfiggroup "" Any noauth exact none none
At this point, the simple configuration is complete.
Report:
Com2sec notconfiguser default Publicgroup notconfiggroup v1 notconfigusergroup notconfiggroup v2c notCon Figuserview all included. 1access Notconfiggroup "", any noauth exact and none none
detect with Snmpwalk on the host
SNMPWALK-V 1 host-c Public system
Configuring SNMP under Linux