Home General Topics A practical guide Linux Socket Monitor

A practical guide Linux Socket Monitor

by Bella

LSM is a network socket monitor; it is designed to track changes to Network sockets and Unix domain sockets, effectively a port monitor. It does this by a rather simple differential based comparison of current and new server sockets (Server Ports).

A simple and configurable alerting system sends alerts whenever new ports activate. LSM will ignore services that are currently holding sockets open, events are only applicable when a ‘new’ socket (port) is created.

Install And Configure Linux Socket Monitor (LSM)

1. Download the latest version of LSM from the rfxn.com

# cd /usr/local/src
# wget http://www.rfxn.com/downloads/lsm-current.tar.gz

2. Extract the contents from the tarball:

# tar -xvf lsm-current.tar.gz

3. Enter the directory and run the installation:

# cd lsm-0.6
# ./install.sh ( To Install )

===========

.: LSM installed
Install path: /usr/local/lsm
Config path: /usr/local/lsm/conf.lsm
Executable path: /usr/local/sbin/lsm
LSM version 0.6 <lsm@r-fx.org>
Copyright (C) 2004, R-fx Networks
2004, Ryan MacDonald
This program may be freely redistributed under the terms of the GNU GPL

generated base comparison files
===========

Before we receive any notifications we need to edit the config file and enter our e-mail address:

# vi /usr/local/lsm/conf.lsm

USER=”root”

to

USER=”user@example.com” # Alert email addresses
Here we can alert port modification to any email address.
———

LSM uses cron to run every 10 minutes and when it finds a new network socket, it will notify via email.

Also we can delete or recreate the comparison files by the below commands:
Delete comparison files: /usr/local/sbin/lsm -d

Compare current socket information to comparison files: /usr/local/sbin/lsm -c
Generate base comparison files: /usr/local/sbin/lsm -g

Need expert assistance?

SupportPRO has a team of well-experienced professionals. We can assist you in the installation and configuration of LSM in your server. Feel free to contact us if you need assistance.

If you require help, contact SupportPRO Server Admin

Server not running properly? Get A FREE Server Checkup By Expert Server Admins - $125 Value

Leave a Comment