Linux Server
- What is Discovered and Monitored
- Event Types
- Rules
- Reports
- Configuration
- Settings for Access Credentials
What is Discovered and Monitored
Protocol | Information Discovered | Metrics collected | Used for |
---|---|---|---|
SNMP | Host name, generic hardware (cpu, memory, network interface, disk), software (operating system version, installed software, running processes, open TCP/UDP ports) | Uptime, CPU/Memory/Network Interface/Disk space utilization, Swap space utilization, Network Interface Errors, Running Process Count, Installed Software change, Running process CPU/memory utilization, Running process start/stop, TCP/UDP port up/down | Performance Monitoring |
SSH | OS type, Hardware (cpu details, memory) | Memory paging rate, Disk I/O utilization | Performance Monitoring |
Syslog | Vendor, Model | General logs including Authentication Success/Failure, Privileged logons, User/Group Modification | Security Monitoring and Compliance |
Syslog (via FortiSIEM Linux Agent) |
|
File or directory change: User, Type of change, directory or file name | Security Monitoring and Compliance |
Event Types
In ADMIN > Device Support > Event Types, search for "linux" to see the event types associated with this device.
Rules
In RESOURCES > Rules, search for "linux" in the main content panel Search... field to see the rules associated with this device.
Reports
In RESOURCES > Reports , search for "linux" in the main content panel Search... field to see the reports associated with this device.
Configuration
SNMP v1 and v2c
- Make sure that snmp libraries are installed. FortiSIEM has been tested to work with net-snmp libraries.
- Log in to your server with administrative access.
- Make these modifications to the
/etc/snmp/snmpd.conf
file:- Define the community string for FortiSIEM usage and permit snmp access from FortiSIEM IP.
- Allow FortiSIEM read-only access to the
mib-2
tree. - Allow Accelops read-only access to the enterprise MIB:
UCD-SNMP-MIB
. - Open up the entire tree for read-only view.
- Reduce the logging level to avoid per connection logging which may cause resource issues (see here for more details):
- Edit
/etc/sysconfig/snmpd
(on RedHat/CentOS) or/etc/defaults/snmpd
(on Debian/Ubuntu) - Look for the line that passes the command line options to snmpd. On RedHat Enterprise 6 this looks like:
# snmpd command line options OPTIONS="-LS0-6d -Lf /dev/null -p /var/run/snmpd.pid"
- Change the range from 0-6 to 0-5:
# snmpd command line options OPTIONS="-LS0-5d -Lf /dev/null -p /var/run/snmpd.pid"
- Edit
- Restart the snmpd deamon by issuing
/etc/init.d/snmpd restart
. - Add the snmpd daemon to start from boot by issuing
chkconfig snmpd on
. - Make sure that snmpd is running.
SNMP v3
Configuring rwcommunity/rocommunity or com2sec
- Log in to your Linux server.
-
Stop SNMP.
service snmpd stop
-
Use vi to edit the
/etc/snmp/snmpd.conf
file.
Before you edit this file, make sure you have created a backup, as it is very important to have a valid version of this file so the snap daemon has correct credentials.vi /etc/snmp/snmpd.conf
- At the end of the file, add this line, substituting your username for
snmpv3user
and removing the<>
tags:rouser <snmpv3user>
. - Save the file.
-
Use vi to edit the
/var/lib/snmp/snmpd.conf
file.
Before you edit this file, make sure you have created a backup, as it is very important to have a valid version of this file for the SNMP daemon to function correctly.vi /var/lib/snmp/snmpd.conf
-
At the end of the file, add this line, entering the username you entered in step 4, and then passwords for that user for MD5 and DES.
If you want to use SHA or AES, then add those credentials as well.createUser <snmpv3user> MD5 <snmpv3md5password> DES <snmpv3despassword>
- Save the file.
- Reduce the logging level to avoid per connection logging which may cause resource issues (see here for more details)
- Edit
/etc/sysconfig/snmpd
(on RedHat/CentOS) or/etc/defaults/snmpd
(on Debian/Ubuntu) - Look for the line that passes the command line options to
snmpd
. On RedHat Enterprise 6 this looks like:# snmpd command line options OPTIONS="-LS0-6d -Lf /dev/null -p /var/run/snmpd.pid"
- Change the range from 0-6 to 0-5:
# snmpd command line options OPTIONS="-LS0-5d -Lf /dev/null -p /var/run/snmpd.pid"
- Edit
-
Restart SNMP.
service snmpd start chkconfig auditd on
-
View the contents of the
/var/lib/snmp/snmpd.conf
file.If this works, restarting
snmpd
will have no errors, also the entry that you created under/var/lib/snmp/snmpd.conf
will be removed:cat /var/lib/snmp/snmpd.conf
- Run
snmpwalk -v 3 -u <snmpv3user> -l authpriv <IP> -a MD5 -A <snmpv3md5password> -x DES -X <snmpv3despassword>
You will see yoursnmpwalk
if this works. If there are any errors, seenet-snmp
for further instructions.
Configuring net-smnp-devel
If you have net-snmp-devel
on your Linux server/client, follow these steps to configure SNMP v3.
-
Stop SNMP.
service snmpd stop
- Run
net-snmp-config --create-snmpv3-user -ro -A <MD5passwordhere> -X <DESpasswordhere> -x DES -a MD5 <SNMPUSERNAME>.
-
Restart SNMP.
service snmpd start
- Test by following step 10 from above.
SSH
- Make sure that the
vmstat
andiostat
commands are available. If not, install these libraries. - Create a user account that can issue
vmstat
andiostat
commands. FortiSIEM will use that user account to log in to the server.
Syslog Logging
Syslog forwarding can be configured on Linux servers to send the logs to FortiSIEM. There are different options regarding syslog configuration, including Syslog over TLS.
There are typically two commonly-used Syslog demons:
Basic Syslog-ng Configuration
Follow these steps to enable basic Syslog-ng:
- Add the following line to your Syslog-ng configuration:
{ udp("Collector IP" port(514));};
- Restart the syslog-ng service or reload the configuration.
Basic rsyslog Configuration
Follow these steps to enable ryslog:
-
Add the following lines to your ryslog configuration:
# Send logs to the FortiSIEM Collector
*.* @Collector IP:514
- Restart the rsyslog service or reload the configuration.
Linux File Monitoring
FortiSIEM has licensed Linux agents that provide additional capabilities, such as custom log forwarding and central management. See the “Linux Agent Installation Guide” for details on this agent.
Settings for Access Credentials
SNMP Access Credentials for All Devices
Set these Access Method Definition values to allow FortiSIEM to communicate with your device over SNMP. Set the Name and Community String.
Setting | Value |
---|---|
Name | <set name> |
Device Type | Generic |
Access Protocol | SNMP |
Community String | <your own> |
SSH Access Credentials for All Devices
These are the generic settings for providing SSH access to your device from FortiSIEM.
Setting | Value |
---|---|
Name | ssh-generic |
Device Type | Generic |
Access Protocol | SSH |
Port | 22 |
User Name | A user who has access credentials for your device over SSH |
Password | The password for the user |