Measure the test taker's knowledge about the traffic and tcp connections of a remote linux host.

Source: Internet
Author: User
Article title: obtain the traffic and tcp connections of a remote linux host. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

Measure the test taker's knowledge about the traffic and tcp connections of a remote linux host.
First, configure the snmp. conf file of the remote linux host (which can be understood as the client)
Vi/etc/snmp. conf
You only need to modify a few places.
####
# First, map the community name "public" into a "security name"
# Sec. name source community
Com2sec notConfigUser *. * username # *. * is the IP address username of the machine you remotely monitor. it is a trusted group name.
####
# Second, map the security name into a group name:
# GroupName securityModel securityName
Group notConfigGroup v1 notConfigUser
Group notConfigGroup v2c notConfigUser

####
# Third, create a view for us to let the group have rights:
# Make at least snmpwalk-v 1 localhost-c public system fast again.
# Name incl/excl subtree mask (optional)
View systemview embedded DED. 1.3.6.1.2.1.1
View systemview embedded DED. 1.3.6.1.2.1.2
View systemview embedded DED. 1.3.6.1.2.1.25.1.1
View all supported DED. 1
####
# Finally, grant the group read-only access to the systemview view.
# Group context sec. model sec. level prefix read write notif
# Access notConfigGroup "" any noauth exact mib2 none
Access notConfigGroup "" any noauth exact all none
# Here is a commented out example configuration that allows less
# Restrictive access.
# YOU shoshould change the "COMMUNITY" TOKEN BELOW TO A NEW KEYWORD ONLY
# Known at your site. YOU * MUST * CHANGE THE NETWORK TOKEN BELOW
# Something reflecting your local network address space.
# Sec. name source community
Com2sec notConfigUser default username # username is a trusted group name
Com2sec *. 0 *. *. */24 username # username is a trusted group name *. * is the IP address of your remote monitoring machine.
# Group. name sec. model sec. name
Group MyRWGroup any local
Group MyROGroup any mynetwork
Group notConfigUser any zcom
#
# Group MyRWGroup any otherv3user
#...
# Incl/excl subtree mask
View all supported DED. 1 80
#-Or just the mib2 tree-
View mib2 shortded .iso.org. dod. internet. mgmt. mib-2 fc

# Context sec. model sec. level prefix read write notif
Access MyROGroup "" any noauth 0 all none
Access MyRWGroup "" any noauth 0 all

Save the modification and exit.
/Etc/init. d/snmpd restart
Monitoring end (which can be understood as the server end)
# Snmpwalk-v 2c-c username *. * system
Check whether remote system data can be obtained
# Snmpwalk-v 2c-c username *. * | grep IF-MIB: ifInOctets.1 view your Nic traffic
Write the IF-MIB in your mrtg File: ifInOctets.1 mrtg won't fetch traffic
# Mib2c IF-MIB: ifInOctets.1 convert to mib value, the result is similar
1.3.6.1.2.1.2.2.1.10
Write a sentence similar to this in your mrtg file
Target [*. *. *. * _ BW_LAN]: 1: username @*. *. *. * # username is a trusted group name *. *. *. * It is the IP address of the machine you remotely monitor.
Title [*. * _ BW_LAN]: 202.102.251.20.
PageTop [*. * _ BW_LAN]: *. *

This article from the "to get the end, must first to the blog, please be sure to keep this source http://weijia.blog.51cto.com/616222/119903

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.