Linux or window is the default port for modifying SNMP

Source: Internet
Author: User
Tags snmp snmp port

SNMP default port communication using UDP 161, in the process of installing some monitoring software, often prompted the port is occupied, and so on how to modify the system's default SNMP port

Windows modifies SNMP ports

1 Opening a Services file

Path: C:\Windows\System32\drivers\etc

2 modifying ports

Modified before: SNMP 161/udp #SNMP

Modified: SNMP 1161/udp #SNMP

3 Service to restart SNMP

Linux modifies SNMP ports

1 Modifying the Linux/etc/snmp/snmpd.conf file

Command: VI etc/snmp/snmpd.conf

2 Modify the SNMP monitored port to 1161 to add the following line

Command: Agentaddress 1161

Save, exit

3 Alternatively, you can modify the name of the service

Modify the name of the SNMP monitor to monitor

The revised content is as follows: Com2sec notconfiguser default Monitor

4 Restart SNMP Service

Command: Service snmpd restart

or use the following command to start

Command:/ETC/RC.D/INIT.D/SNMPD start on the line.

Unix I haven't verified yet

CENTOS5.3,SNMP version 5.3,rpm package.

By default, SNMPD listens for SNMP requests on UDP161, and we may want to change the ports by giving SNMPD the ability to specify the listening address and port in the following form:[<transport-specifier>:]< Transport-address>

<transport-specifier> <transport-address> Format

UDP (default) hostname[:p ort] or ipv4-address[:p ORT]

TCP hostname[:p ort] or ipv4-address[:p ORT]

UNIX pathname

IPX [Network]:node[/port]

AAL5PVC or PVC [interface.] [VPI.] VCI

UDP6 or Udpv6 or Udpipv6 hostname[:p ort] or ipv6-address[:p ORT]

TCP6 or Tcpv6 or Tcpipv6 hostname[:p ort] or ipv6-address[:p ORT]

Note:<transport-specifier> case insensitive.

The simplest implementation is as follows:

/USR/SBIN/SNMPD tcp: Port or/USR/SBIN/SNMPD UDP: Port
Or

Vi/etc/rc.d/init.d/snmpd

Modified before options= "-lsd-lf/dev/null-p/var/run/snmpd.pid-a"

options= "Tcp:9999-lsd-lf/dev/null-p/var/run/snmpd.pid-a" after modification

/ETC/RC.D/INIT.D/SNMPD start on the line.

Linux or window is the default port for modifying SNMP

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.