# Experiment 3 – Centralized Syslog Monitoring and Analysis

Objective: Monitor and analyze log events from multiple Linux hosts using rsyslog and a centralized log server to identify authentication failures, service issues and suspicious activities.

## 1. What is Syslog?

Syslog is a standard protocol used to collect, transmit and store log messages from different devices and systems.

It helps administrators monitor system activities, troubleshoot errors and detect suspicious events.

## 2. What is centralized logging?

Centralized logging means collecting logs from multiple systems and storing them at a single central server.

It makes monitoring easier because administrators can analyze events from different machines in one place.

## 3. What is rsyslog?

Rsyslog is a Linux logging service used to collect, process, filter and forward log messages.

It supports both local logging and centralized logging across multiple systems.

## 4. Explain the architecture of centralized Syslog monitoring.

It consists of:

- Client: Generates log messages from system activities.
- Rsyslog service: Collects and forwards log messages.
- Log server: Receives and stores logs from multiple clients.
- Administrator: Analyzes logs to identify errors or suspicious activities.

The client forwards logs to the central server, where they are stored and analyzed.

## 5. What are the different Syslog severity levels?

Syslog defines eight severity levels:

| Level | Severity      | Meaning                   |
| ----- | ------------- | ------------------------- |
| 0     | Emergency     | System unusable           |
| 1     | Alert         | Immediate action required |
| 2     | Critical      | Critical condition        |
| 3     | Error         | Error condition           |
| 4     | Warning       | Warning condition         |
| 5     | Notice        | Normal but significant    |
| 6     | Informational | General information       |
| 7     | Debug         | Debugging information     |

Remember: 0 is the highest severity, while 7 is the lowest.

## 6. What is a Syslog facility?

A facility identifies the source or category of a log message.

Examples:

- `auth` – Authentication-related events.
- `kern` – Kernel messages.
- `mail` – Mail system messages.
- `cron` – Scheduled task messages.
- `daemon` – Background service messages.

## 7. What is the purpose of the `logger` command?

The `logger` command generates custom log messages from the Linux command line.

It is useful for testing whether logs are successfully collected and forwarded to the centralized server.

Example:

```
logger "Test message from client"
```

## 8. What is log forwarding?

Log forwarding means sending log messages from one machine to another machine, usually a centralized log server.

In our experiment, rsyslog forwards logs from the client system to the central server for storage and analysis.

## 9. Which ports and protocols does Syslog use?

Common Syslog transport options are:

- UDP 514: Traditional Syslog communication.
- TCP 514: Reliable Syslog transport.
- TCP 6514: Syslog over TLS, providing encrypted communication.

UDP does not guarantee message delivery, whereas TCP provides reliable transmission.

## 10. What is log filtering?

Log filtering means selecting specific log messages based on conditions such as facility, severity, hostname or message content.

It helps administrators focus on important events instead of analyzing every log entry.

## 11. How can repeated authentication failures be identified?

By analyzing authentication logs and searching for repeated failed login attempts.

For example, multiple `FAILED_LOGIN` entries from the same IP address may indicate a brute-force attack or suspicious login activity.

## 12. What is a brute-force attack?

A brute-force attack is an attempt to gain unauthorized access by repeatedly trying different passwords or credentials.

Repeated authentication failures from the same source can be an indicator of such an attack.

## 13. What is the difference between local and centralized logging?

- Local logging: Logs are stored on the same machine where events occur.
- Centralized logging: Logs from multiple machines are forwarded to and stored on a central server.

Centralized logging makes investigation and monitoring easier.

## 14. Why is centralized logging important?

- Provides a single location to analyze logs.
- Helps detect suspicious activities.
- Makes troubleshooting easier.
- Maintains records of events across multiple systems.
- Helps identify patterns and repeated failures.

## 15. How would you create an alert for repeated login failures?

I would configure a log filtering rule to identify failed authentication events and count repeated failures within a specific time interval. If the count crosses a predefined threshold, an alert can be generated for investigation.

## Last-minute revision

| Term                | Remember                                 |
| ------------------- | ---------------------------------------- |
| Syslog              | Logging protocol                         |
| rsyslog             | Linux logging service                    |
| Centralized logging | Logs from multiple systems at one server |
| `logger`            | Generate test log messages               |
| Facility            | Source/category of log                   |
| Severity            | Importance of log                        |
| UDP 514             | Traditional Syslog                       |
| TCP 514             | Reliable Syslog                          |
| TCP 6514            | Syslog over TLS                          |
| Log filtering       | Select specific log events               |
| Brute force         | Repeated password attempts               |
| Authentication logs | Login-related events                     |

Important for practical viva

Focus on:

1. Difference between Syslog and rsyslog.
2. Centralized logging architecture.
3. Eight severity levels (0–7).
4. Facility vs severity.
5. `logger` command.
6. UDP vs TCP.
7. Repeated authentication failures and brute-force attacks.
8. Log filtering and alert conditions.

Based on Experiment 3 of your CS414 lab question bank.&#x20;

CS414_ITIMM_Lab_ESE.pdf
