About Work Contact
Back to work

Linux Hardening Project

Security Ubuntu Systems administration

A documentation guide covering baseline security practices for Linux servers, from SSH key authentication to firewall configuration and service auditing.

Linux Terminal Setup

Fig 1. Linux hardening overview

Access control

Default operating system installations often prioritize ease of use over security. Securing remote administration through SSH is the foundational first step in server hardening.

The guide details auditing the sshd_config file to disable direct root logins, enforce cryptographic key-based authentication, and disable password authentication to prevent brute-force attacks.

SSH Config Edits 1
SSH Config Edits 2
Service Restart

Figs 2–4. Disabling root SSH access & password authentication

Surface reduction

Minimizing the attack surface is a primary security objective. Unused packages and active listening daemons introduce unnecessary exposure. The documentation outlines identifying and removing default services and non-essential software.

Listing Packages
Removing Packages
Cleaning Dependencies

Figs 5–7. Auditing and removing unused packages

Perimeter defense

For network perimeter control, the guide documents configuring UFW (Uncomplicated Firewall). The firewall enforces a default-deny inbound policy, permitting only explicit required ports (such as SSH, HTTP, and HTTPS) and dropping unsolicited traffic.

UFW Status
UFW Allow Rules
UFW Enable
UFW Verbose Status

Figs 8–11. Configuring a default-deny firewall posture

File auditing

System integrity also requires internal permission controls. The documentation explains auditing file permissions, restricting access to sensitive configuration files, and verifying root ownership on system binaries with chmod and chown.

Checking Permissions
Modifying Permissions

Figs 12–13. Auditing & modifying critical file permissions

Time sync (NTP)

Reliable logging depends on synchronized system clocks. Accurate timestamps are required for correlating log entries across services and conducting security audits.

The final section covers configuring Network Time Protocol (NTP) through systemd-timesyncd to maintain synchronization with network time servers.

NTP Setup 1
NTP Setup 2

Figs 14–15. Establishing reliable time synchronization