> Source: https://docs.cyberelements.io/saas/fi/Security/SystemHardening/SystemHardening/

# System hardening

Applied to information security, **hardening** means improving the security of a system by reinforcing its configuration or its structure.

The Edge Gateway virtual appliance relies on the **Debian** operating system. This chapter sets out the recommendations for reinforcing the configuration of those servers.

The settings proposed must be **adapted to the operational context**, to the deployed architecture and to operational constraints. For each recommendation, three courses of action are possible:

- **apply** it as proposed;
- **adapt** the recommended values where the context warrants it;
- **set it aside** where its technical value is slight or incompatible with the operational context, subject to justification.

> **Information**
>
> For a deployment as a virtual machine or OVA, the recommendations concerning the BIOS, UEFI, hyper-threading or hardware components belong to the **hosting infrastructure** and must be handled in the hypervisor hardening procedures.

Where the servers are supplied as an **OVA**, some recommendations may already be preconfigured. Others depend on the deployment environment.

The review of applied recommendations must be carried out after initial installation, after any major update and as part of regular configuration audits; that general principle is not repeated for each recommendation.

> **Warning!**
>
> Some recommendations in this chapter (notably configuring a **GRUB password** and the **boot hardening options**) belong by nature to the "reserved for support/project" category: they **must not be applied without prior validation** in a representative environment.

## Summary

| # | Recommendation | Page | Edge Gateway |
|---|---|---|---|
| [**R1**](https://docs.cyberelements.io/saas/fi/Security/SystemHardening/SystemInstallation/#r1) | Minimal Debian installation | [Installation](https://docs.cyberelements.io/saas/fi/Security/SystemHardening/SystemInstallation/#r1) | ✅ |
| [**R2**](https://docs.cyberelements.io/saas/fi/Security/SystemHardening/SystemInstallation/#r2) | Debian version and security maintenance | [Installation](https://docs.cyberelements.io/saas/fi/Security/SystemHardening/SystemInstallation/#r2) | ✅ |
| [**R3**](https://docs.cyberelements.io/saas/fi/Security/SystemHardening/SystemInstallation/#r3) | Appropriate disk partitioning | [Installation](https://docs.cyberelements.io/saas/fi/Security/SystemHardening/SystemInstallation/#r3) | ✅ |
| [**R4**](https://docs.cyberelements.io/saas/fi/Security/SystemHardening/SystemInstallation/#r4) | Removal of unnecessary packages installed by default | [Installation](https://docs.cyberelements.io/saas/fi/Security/SystemHardening/SystemInstallation/#r4) | ✅ |
| [**R5**](https://docs.cyberelements.io/saas/fi/Security/SystemHardening/SystemInstallation/#r5) | Review of active services and listening ports | [Installation](https://docs.cyberelements.io/saas/fi/Security/SystemHardening/SystemInstallation/#r5) | ✅ |
| [**R6**](https://docs.cyberelements.io/saas/fi/Security/SystemHardening/SystemInstallation/#r6) | Integrity check of packages and APT repositories | [Installation](https://docs.cyberelements.io/saas/fi/Security/SystemHardening/SystemInstallation/#r6) | ✅ |
| [**R7**](https://docs.cyberelements.io/saas/fi/Security/SystemHardening/SystemInstallation/#r7) | Controlled automation of Debian security updates | [Installation](https://docs.cyberelements.io/saas/fi/Security/SystemHardening/SystemInstallation/#r7) | ✅ |
| [**R8**](https://docs.cyberelements.io/saas/fi/Security/SystemHardening/SystemAccounts/#r8) | Management of local accounts and restriction of the root account | [Accounts](https://docs.cyberelements.io/saas/fi/Security/SystemHardening/SystemAccounts/#r8) | ✅ |
| [**R9**](https://docs.cyberelements.io/saas/fi/Security/SystemHardening/SystemAccounts/#r9) | Privileged administration with sudo | [Accounts](https://docs.cyberelements.io/saas/fi/Security/SystemHardening/SystemAccounts/#r9) | ✅ |
| [**R10**](https://docs.cyberelements.io/saas/fi/Security/SystemHardening/SystemAccounts/#r10) | Local authentication policy (libpam-pwquality, pam_faillock) | [Accounts](https://docs.cyberelements.io/saas/fi/Security/SystemHardening/SystemAccounts/#r10) | ✅ |
| [**R11**](https://docs.cyberelements.io/saas/fi/Security/SystemHardening/SystemFilesystem/#r11) | Control of permissions and sensitive files | [File system](https://docs.cyberelements.io/saas/fi/Security/SystemHardening/SystemFilesystem/#r11) | ✅ |
| [**R12**](https://docs.cyberelements.io/saas/fi/Security/SystemHardening/SystemFilesystem/#r12) | Hardening of configuration files and sensitive directories | [File system](https://docs.cyberelements.io/saas/fi/Security/SystemHardening/SystemFilesystem/#r12) | ✅ |
| [**R13**](https://docs.cyberelements.io/saas/fi/Security/SystemHardening/SystemKernelAndNetwork/#r13) | sysctl parameters for system and network hardening | [Kernel and network](https://docs.cyberelements.io/saas/fi/Security/SystemHardening/SystemKernelAndNetwork/#r13) | ✅ |
| [**R14**](https://docs.cyberelements.io/saas/fi/Security/SystemHardening/SystemKernelAndNetwork/#r14) | Disabling or controlling IPv6 | [Kernel and network](https://docs.cyberelements.io/saas/fi/Security/SystemHardening/SystemKernelAndNetwork/#r14) | ✅ |
| [**R15**](https://docs.cyberelements.io/saas/fi/Security/SystemHardening/SystemKernelAndNetwork/#r15) | Advanced boot and kernel hardening (kernel options) | [Kernel and network](https://docs.cyberelements.io/saas/fi/Security/SystemHardening/SystemKernelAndNetwork/#r15) | ✅ |
| [**R16**](https://docs.cyberelements.io/saas/fi/Security/SystemHardening/SystemKernelAndNetwork/#r16) | Password on the GRUB boot loader | [Kernel and network](https://docs.cyberelements.io/saas/fi/Security/SystemHardening/SystemKernelAndNetwork/#r16) | ✅ |
| [**R17**](https://docs.cyberelements.io/saas/fi/Security/SystemHardening/SystemIntegrity/#r17) | Hardening and review of scheduled tasks | [Integrity](https://docs.cyberelements.io/saas/fi/Security/SystemHardening/SystemIntegrity/#r17) | ✅ |
| [**R18**](https://docs.cyberelements.io/saas/fi/Security/SystemHardening/SystemIntegrity/#r18) | Customisation of the system banner | [Integrity](https://docs.cyberelements.io/saas/fi/Security/SystemHardening/SystemIntegrity/#r18) | ✅ |
| [**R19**](https://docs.cyberelements.io/saas/fi/Security/SystemHardening/SystemIntegrity/#r19) | Integrity check of system files with debsums | [Integrity](https://docs.cyberelements.io/saas/fi/Security/SystemHardening/SystemIntegrity/#r19) | ✅ |
| [**R20**](https://docs.cyberelements.io/saas/fi/Security/SystemHardening/SystemIntegrity/#r20) | Integrity baseline with AIDE | [Integrity](https://docs.cyberelements.io/saas/fi/Security/SystemHardening/SystemIntegrity/#r20) | ✅ |
| [**R21**](https://docs.cyberelements.io/saas/fi/Security/SystemHardening/SystemLogsAndTime/#r21) | Configuration of the system logging service | [Logs and time](https://docs.cyberelements.io/saas/fi/Security/SystemHardening/SystemLogsAndTime/#r21) | ✅ |
| [**R22**](https://docs.cyberelements.io/saas/fi/Security/SystemHardening/SystemLogsAndTime/#r22) | Protection and rotation of logs | [Logs and time](https://docs.cyberelements.io/saas/fi/Security/SystemHardening/SystemLogsAndTime/#r22) | ✅ |
| [**R23**](https://docs.cyberelements.io/saas/fi/Security/SystemHardening/SystemLogsAndTime/#r23) | Protection of command histories and administration traces | [Logs and time](https://docs.cyberelements.io/saas/fi/Security/SystemHardening/SystemLogsAndTime/#r23) | ✅ |
| [**R24**](https://docs.cyberelements.io/saas/fi/Security/SystemHardening/SystemLogsAndTime/#r24) | Time synchronisation with NTP | [Logs and time](https://docs.cyberelements.io/saas/fi/Security/SystemHardening/SystemLogsAndTime/#r24) | ✅ |
