How To Install and Setup SNMP Service or Daemon For Linux

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/install-and-setup-snmp-service-or-daemon-for-linux/
PINTEREST
PINTEREST
INSTAGRAM

Today we will look SNMP in Linux operating systems. Simple network management protocol named SNMP is designed for getting info and setting configuration in it entities. These entities may be switch, router, PC, cabinet, printer etc. SNMP was very popular in 2000s. today it is popular too but used for information gathering. Especially monitoring which will be examined later is made today with snmp. Snmp has an index database which named Management Information Base (MIB) used for data classification. Vendors generally publish their MIBs. For example Cisco MIB can be found http://www.cisco.com/public/sw-center/netmgmt/cmtk/mibs.shtml . The system that gathers snmp info generally named Network management station. The systems that provides info or apply settings about yourself named Managed device. Agent is a tool that runs on Managed Device and responsible for snmp.

Install SNMP Ubuntu, Debian, Mint

We can install SNMP service to the deb based distributions like below. The package name is snmpd.

Install SNMP Ubuntu, Debian, Mint

Install SNMP Ubuntu, Debian, Mint

Install SNMP Fedora, CentOS, RedHat

Firstly we install snmp daemon, library and tool with this command in Fedora, CentOS, RHEL .

List Snmpd Service Status

After installing SNMP package we can check status of the service or daemon. We will use systemctl command against service called snmpd.

List Snmpd Service Status

List Snmpd Service Status

SNMP Service Configuration File snmpd.conf

SNMP service configuration file is located at /etc/snmp. It is named snmpd.conf . It holds all detailed information about the service like sysContact , sysLocation , public and private passwords. We can also create users and restrict the user and OIB access etc. In order to change this configuration we need root privileges.

SNMP Service Configuration File snmpd.conf

SNMP Service Configuration File snmpd.conf

Configure For Remote Connection

Security is important aspect for todat IT environment. In order to make SNMP default installation the service only listen local connections via 127.0.0.1 or localhost . Because default installation will have passwords like public and private. A remote attacker can access to the snmp service. Before enabling remote access change public and private password.

LEARN MORE  Windows Process Explorer To Get Detailed Information About Processes

Find following line

change to listen all interfaces

Change sysContact and sysLocation

We can also change the contact and location information via sysContact and sysLocation attributes. We will find the in snmpd.conf file and set whatever we want.

Change sysContact and sysLocation

Change sysContact and sysLocation

Restart SNMP Service For Reload New Configuration

We made some configuration. In order to make them effective we should reload configuration. Most pratical way to reload configuration is restarting the snmpd service like below.

Test SNMP Service

We can test our new configuration and snmp service with one of snmp tool. In this example we will use snmpwalk which will list all snmp data.

Test SNMP Service

Test SNMP Service

As we can see our new data like contact and location information is activated and listed accordingly.

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/install-and-setup-snmp-service-or-daemon-for-linux/
PINTEREST
PINTEREST
INSTAGRAM

You may also like...

Leave a Reply

Your email address will not be published.

Enjoy this blog? Please spread the word :)