Configuring SNMP under Linux

Source: Internet
Author: User
Tags snmp snmpwalk

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.