Interaction with Kaspersky Web Traffic Security over SNMP is achieved using the 'snmpd' service of the operating system. The snmpd service acts as a master agent, receiving and processing requests from monitoring systems and other external consumers over SNMP. Kaspersky Web Traffic Security connects to the snmpd service as a subagent over the AgentX protocol through a UNIX™ socket.
Installing the snmpd service
If Kaspersky Web Traffic Security was installed from an ISO file, no further actions are necessary. If Kaspersky Web Traffic Security was installed from an RPM or DEB package, make sure that the snmpd service is installed in your operating system. If the service is not installed, install the appropriate packages.
To install the snmpd service and auxiliary utilities
enter the following command:
yum install net-snmp net-snmp-utils
apt install snmp snmpd
Creating a user account for access to the data
Before creating the account, stop the snmpd service.
To ensure the security of access to the data over SNMPv3 with authentication and encryption, you need to create a user account on the snmpd service side with the following information:
For security purposes, we recommend using an independent user account on each node of the Kaspersky Web Traffic Security cluster.
You can create a user account in the following ways:
To create a user account using the net-snmp-create-v3-user utility:
If Kaspersky Web Traffic Security was installed from an RPM or DEB package, start the command shell of the operating system to run commands with superuser (system administrator) permissions.
net-snmp-create-v3-user -ro -a <
authentication algorithm
> -x <
encryption algorithm
> <
user name
>
Authentication and encryption passwords are requested interactively.
Example:
|
To create a user account without the utility:
touch /var/lib/snmp/snmpd.conf
createUser <
user name
> <
authentication algorithm
> "<
authentication password
>" <
encryption algorithm
> "<
encryption password
>"
Example:
|
Creating a user account for receiving SNMP traps
To receive SNMP traps over SNMPv3 with authentication and encryption, you need to create an account on the side of the monitoring system in the context of the corresponding service (usually the snmptrapd service).
The account must contain the following information:
For security purposes, you must use separate user accounts for access to data and for receiving SNMP traps.
We recommend creating independent user accounts for receiving SNMP traps from each node of the Kaspersky Web Traffic Security cluster.
For instructions on creating a user account for receiving SNMP traps, refer to the documentation of your monitoring system.
Configuring the snmpd service
The configuration of the snmpd service is stored in the /etc/snmp/snmpd.conf file. You must create a new configuration file and add to it the following lines in the given order.
To configure the snmpd service:
If Kaspersky Web Traffic Security was installed from an RPM or DEB package, start the command shell of the operating system to run commands with superuser (system administrator) privileges.
mv -f /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.backup
touch /etc/snmp/snmpd.conf
chown root:root /etc/snmp/snmpd.conf
chmod 600 /etc/snmp/snmpd.conf
# Listen for incoming SNMP requests via UDP
agentAddress udp:161
# Listen for incoming SNMP requests via UDP
agentAddress udp:127.0.0.1:161
# Listen for subagent connections via UNIX socket
master agentx
agentXSocket unix:/var/run/agentx-master.socket
agentXPerms 770 770 kluser klusers
# Basic system information
sysDescr <
system description
>
sysLocation <
system location
>
sysContact <
contact address of the administrator
>
sysServices 72
# Kaspersky Web Traffic Security SNMP statistics
view monitoring included .1.3.6.1.4.1.23668.2022
Information about the operating system includes, for example, information about CPU and RAM usage, free space on disk partitions, load of network interfaces; a list of installed software; a list of open network connections; and a list of running processes. Part of this information may be confidential.
# SNMPv2-MIB - Basic system information
view monitoring included .1.3.6.1.2.1.1
# HOST-RESOURCES-MIB - CPU, Memory, Filesystems
view monitoring included .1.3.6.1.2.1.25.1
view monitoring included .1.3.6.1.2.1.25.2
view monitoring included .1.3.6.1.2.1.25.3
view monitoring included .1.3.6.1.2.1.25.5
# UCD-SNMP-MIB - Memory and CPU usage
view monitoring included .1.3.6.1.4.1.2021.4
view monitoring included .1.3.6.1.4.1.2021.10
view monitoring included .1.3.6.1.4.1.2021.11
# UCD-SNMP-DISKIO-MIB - Block devices I/O statistics
view monitoring included .1.3.6.1.4.1.2021.13
# IF-MIB - Network interfaces I/O statistics
view monitoring included .1.3.6.1.2.1.2
view monitoring included .1.3.6.1.2.1.31
# Allow access to the whole OID tree
view monitoring included .1
# Access control for SNMPv3 monitoring system user
rouser <
user name
> priv -V monitoring
# Send SNMPv3 traps to the monitoring system
trapsess -Ci -v3 -t0.1 -r1 -l authPriv -u <
user name for receiving traps
> -a <
authentication algorithm
> -A "<
user password for receiving traps
>" -x <
encryption algorithm
> -X "<
encryption password
>" udp:<
IP address
>:162
The snmpd service will be configured.
To integrate with multiple monitoring systems, create a separate user account for each system, specify the scope of available information for each user account (the 'view' and 'rouser' directives) and configure the sending of SNMP traps (the 'trapsess' directive).
Example of an snmpd service configuration file
Starting the snmpd service with the new configuration
To apply the new configuration:
systemctl restart snmpd
systemctl status snmpd
The status must be running.
systemctl enable snmpd
The snmpd service is configured.
Checking the health of the snmpd service
To test the snmpd service, configure the use of SNMP in the Kaspersky Web Traffic Security web interface and request SNMP data using the 'snmpwalk' utility.
To get the scopes of SNMP data provided by Kaspersky Web Traffic Security, run the following command:
snmpwalk -v3 -l authPriv -u <
user name
> -a <
authentication algorithm
> -A "<
authentication password
>" -x <
encryption algorithm
> -X "<
encryption password
>" <
IP address
> .1.3.6.1.4.1.23668.2022
Example: snmpwalk -v3 -l authPriv -u MonitoringUser -a SHA -A "MonitoringAuthSecret" -x AES -X "MonitoringPrivSecret" 127.0.0.1 .1.3.6.1.4.1.23668.2022 |