CIS Hardened Images — Ubuntu 24.04 & Debian 12
BinaryLane now offers CIS-hardened versions of Ubuntu 24.04 and Debian 12. These images come pre-configured with security controls based on the CIS Benchmarks — an industry-standard set of best practices for securing operating systems.
CIS-hardened images are ideal for customers who need a secure starting point for their servers, whether for compliance requirements (ISO 27001, SOC 2, PCI-DSS) or simply to follow security best practices without spending hours on manual hardening.
⚠️ Important: These images disable password authentication and enable a default-deny firewall. Ensure you have an SSH key on your BinaryLane account before deploying. Read the Getting Started section below before your first deployment.
Table of Contents
- What Are CIS Benchmarks?
- What's Changed in These Images
- What's NOT Changed
- Getting Started
- CIS Compliance Scores
- Frequently Asked Questions
- Available Images
What Are CIS Benchmarks?
The Center for Internet Security (CIS) publishes detailed security configuration guides for every major operating system. Each benchmark contains hundreds of specific checks covering:
- Network security — firewall rules, kernel parameters, disabled protocols
- Access control — SSH hardening, password policies, account lockout
- Auditing — system logging, file integrity monitoring, audit trails
- Filesystem — partition isolation, mount options, permission hardening
- Software — removal of unnecessary packages and services
CIS benchmarks are used worldwide by government agencies, financial institutions, healthcare providers, and any organisation that takes security seriously. Many compliance frameworks explicitly reference CIS benchmarks as an acceptable hardening standard.
ℹ️ CIS Level 1 vs Level 2: Our images apply Level 1 controls — security settings that improve your server's posture without significantly impacting usability. Level 2 controls are more restrictive and are typically only required in high-security environments.
What's Changed in These Images
Below is a complete summary of every change compared to the standard BinaryLane images.
SSH Hardening
| Setting | Standard Image | CIS Image |
|---|---|---|
| Password authentication | Enabled | Disabled — SSH key only |
| Root login | Allowed with password | Key-based only |
| X11 forwarding | Enabled | Disabled |
| TCP/Agent forwarding | Enabled | Disabled |
| Max auth tries | 6 | 4 |
| Max sessions | 10 | 4 |
| Client alive interval | Not set | 300 seconds (idle timeout) |
| Login grace time | 120s | 60s |
| Ciphers | Default (includes older ciphers) | AES-256-GCM, ChaCha20, AES-256-CTR only |
| MACs | Default | SHA2-512-ETM, SHA2-256-ETM only |
| Key exchange | Default | Curve25519 only |
| Log level | INFO | VERBOSE |
| Login banner | None | Legal warning banner |
SSH configuration is stored in /etc/ssh/sshd_config.d/10-cis-hardening.conf. The default BinaryLane SSH drop-in (10-binarylane.conf) is removed.
Firewall (nftables)
A stateful nftables firewall is installed, enabled, and configured with a default-deny policy:
- Inbound: Only SSH (port 22) and ICMP ping are allowed by default
- Outbound: All outbound traffic is allowed
- Forward: Dropped (no routing)
- Loopback traffic is allowed; spoofed loopback from external interfaces is dropped
⚠️ You must add firewall rules for any services you run. For example, if you're running a web server, add rules to allow ports 80 and 443. Edit/etc/nftables.confand runsystemctl reload nftables.
Example: To allow HTTP and HTTPS, add these lines inside the chain input block in /etc/nftables.conf, before the closing brace:
tcp dport 80 accept
tcp dport 443 acceptThen reload: systemctl reload nftables
Kernel & Network Hardening
| Category | What's Changed |
|---|---|
| IP forwarding | Disabled (IPv4 and IPv6) |
| ICMP redirects | Sending and accepting disabled |
| Source routing | Disabled |
| Reverse path filtering | Enabled (strict mode) |
| Martian logging | Enabled — logs packets with impossible source addresses |
| SYN cookies | Enabled — protects against SYN flood attacks |
| IPv6 router advertisements | Disabled |
| ASLR | Fully enabled (randomize_va_space = 2) |
| Core dumps | Disabled |
All kernel parameters are set in /etc/sysctl.d/99-cis-hardening.conf.
Disabled Kernel Modules
Unused and potentially dangerous kernel modules are blacklisted to reduce the attack surface:
cramfs, freevxfs, hfs, hfsplus, jffs2, squashfs, udf, dccp, rds, sctp, tipc, cifs, nfs, afs, ceph, exfat, fscache, gfs2, smbfs
ℹ️ Need a blacklisted module? If your application requires a disabled module (e.g.,nfsfor NFS mounts), remove the corresponding file from/etc/modprobe.d/. For example:rm /etc/modprobe.d/cis-nfs_common.conf
Password & Account Policies
| Policy | Setting |
|---|---|
| Minimum password length | 14 characters |
| Password complexity | Requires uppercase, lowercase, digit, and special character |
| Password history | Remembers last 24 passwords |
| Failed login lockout | 5 attempts, then locked for 15 minutes |
| Password expiry | 365 days maximum |
| Minimum password age | 1 day (prevents rapid cycling) |
| Inactive account lock | 30 days after password expires |
| Hashing algorithm | yescrypt (strongest available) |
| Shell timeout | 15 minutes idle — session auto-terminates |
| Default umask | 027 (files not world-readable by default) |
ℹ️ Note: These password policies apply when creating local user accounts. If you only use SSH key authentication (recommended), the password policies won't affect your day-to-day access. The shell timeout (TMOUT=900) will disconnect idle SSH sessions after 15 minutes — edit /etc/profile.d/cis.sh to change this.Audit & Logging
| Component | What It Does |
|---|---|
| auditd | Installed and enabled with 50+ audit rules tracking file changes, permission modifications, user actions, kernel module loading, and privileged command execution |
| rsyslog | Enabled with CIS-compliant file permissions (0640) |
| journald | Configured with size limits (256MB system, 64MB runtime) and 30-day rotation |
| /var/log | Permissions tightened to 0750 |
Audit rules are immutable after boot (-e 2), meaning they cannot be tampered with by an attacker who gains access. A reboot is required to change audit rules.
AppArmor
AppArmor is installed and enabled on boot. AppArmor is a mandatory access control (MAC) framework that restricts what programs can do — even if they're running as root. Default profiles are loaded for installed services.
Filesystem Hardening
| Mount Point | Options | Purpose |
|---|---|---|
/tmp | nodev, nosuid, noexec | Prevents execution of binaries from /tmp (common attack vector) |
/home | nodev, nosuid | Prevents device files and setuid binaries in home directories |
/var/tmp | nodev, nosuid, noexec | Same protections as /tmp |
/dev/shm | nodev, nosuid, noexec | Prevents exploitation of shared memory |
Removed Packages
telnet/inetutils-telnet— unencrypted remote accessftp/tnftp— unencrypted file transferrsync— not needed by default, can be reinstalled if requiredapport— crash reporting that may leak sensitive data
Installed Security Packages
auditd— system call auditingapparmor+apparmor-utils— mandatory access controlaide— file integrity monitoringnftables— modern firewalllibpam-pwquality— password strength enforcementat— job scheduling (required by CIS)rsyslog— system logging (Debian 12 only — Ubuntu includes it by default)chrony— NTP time synchronisation (Debian 12 only — Ubuntu uses timesyncd)
Other Hardening
- Cron permissions tightened — only root can create cron jobs by default
- Sudo logging — all sudo commands logged to
/var/log/sudo.log - Sudo timeout — 15-minute credential cache (re-enter password after)
- su restricted — only members of the
sudogroup can usesu - Login banner — legal warning displayed on SSH and console login
- MOTD removed — no system information leakage on login
What's NOT Changed
These images are designed to be a secure starting point, not a locked-down appliance. The following items are intentionally left for you to configure:
| Item | Why |
|---|---|
| AllowUsers SSH directive | We don't know which users you'll create. Add AllowUsers youruser to /etc/ssh/sshd_config.d/10-cis-hardening.conf after creating your user accounts. |
| Bootloader password | Not practical for cloud VMs where console access is via the VNC panel. |
| AIDE initialisation | AIDE is installed but not initialised. Run aideinit after you've finished setting up your server so the baseline reflects your intended state. |
| Additional firewall rules | Only SSH is allowed inbound. Add rules for your services in /etc/nftables.conf. |
| Separate /var partitions | /tmp, /home, and /var/tmp are isolated. /var and /var/log remain on the root partition. |
| Monitoring agent | No external SIEM or monitoring agent is pre-installed. You can connect your own (e.g., Wazuh, OSSEC, Datadog). |
Getting Started
Prerequisites
| Requirement | Details |
|---|---|
| BinaryLane Account | Sign up at home.binarylane.com.au |
| SSH Key | Must be added to your account before deploying (password auth is disabled) |
| Any VPS Size | CIS images work on all sizes from std-min ($3.75/mo) upwards |
Deploying a CIS-Hardened Image
Step 1: Ensure you have an SSH key added to your BinaryLane account under Dashboard → SSH Keys.
Step 2: Create a new server and select Ubuntu 24.04 CIS or Debian 12 CIS as the operating system image.
Step 3: Once the server is active, connect via SSH:
ssh root@YOUR_SERVER_IP
Step 4: Add firewall rules for any services you plan to run. Edit /etc/nftables.conf and reload:
systemctl reload nftables
Step 5: Create a non-root user and restrict SSH access (recommended):
adduser myuser usermod -aG sudo myuser # Copy SSH key to new user mkdir -p /home/myuser/.ssh cp /root/.ssh/authorized_keys /home/myuser/.ssh/ chown -R myuser:myuser /home/myuser/.ssh # Restrict SSH to your user echo "AllowUsers myuser" >> /etc/ssh/sshd_config.d/10-cis-hardening.conf systemctl restart ssh # Ubuntu systemctl restart sshd # Debian
Step 6: Initialise file integrity monitoring once your server is fully configured:
aideinit
After Deployment Checklist
| Task | Command / Location |
|---|---|
| Add firewall rules for your services | /etc/nftables.conf then systemctl reload nftables |
| Create a non-root user | adduser myuser && usermod -aG sudo myuser |
| Restrict SSH to your user | Add AllowUsers myuser to /etc/ssh/sshd_config.d/10-cis-hardening.conf |
| Initialise file integrity monitoring | aideinit (takes a few minutes) |
| Verify audit rules are loaded | auditctl -l | wc -l (should show 50+) |
| Check AppArmor status | aa-status |
CIS Compliance Scores
These images are tested against CIS benchmarks using Wazuh Security Configuration Assessment (SCA):
| Image | CIS Score | Checks Passed | Benchmark |
|---|---|---|---|
| Ubuntu 24.04 CIS | 82% | 229 / 279 | CIS Ubuntu Linux 24.04 LTS Benchmark v1.0.0 |
| Debian 12 CIS | 85% | 166 / 207 | CIS Debian Linux 12 Benchmark v1.1.0 |
The remaining checks that don't pass fall into these categories:
- Partition layout (11 checks) — /var, /var/log, and /var/log/audit cannot be isolated as separate partitions on cloud VMs without risking data loss. /tmp, /home, and /var/tmp are isolated.
- Firewall tool overlap (10 checks) — CIS checks ufw, iptables, and nftables independently. We use nftables only, so the ufw and iptables checks report as not applicable.
- Bootloader (3 checks) — GRUB password and kernel command-line parameters cannot be reliably set on all cloud platforms.
- Configurable by customer (2 checks) — AllowUsers and PermitRootLogin are left for you to configure based on your requirements.
⭐ Adjusted score: When excluding cloud platform limitations and firewall tool overlap, both images achieve approximately 94% CIS compliance.
Frequently Asked Questions
Can I install additional software?
Yes. The CIS hardening does not prevent you from installing packages with apt. Some kernel modules are blacklisted — if you need one (e.g., nfs for NFS mounts), remove the corresponding file from /etc/modprobe.d/.
Will the CIS image break my application?
The most common things to watch out for:
| Issue | Solution |
|---|---|
| Can't connect to my web app | Add firewall rules for ports 80/443 in /etc/nftables.conf |
| Docker networking broken | Enable IP forwarding: set net.ipv4.ip_forward = 1 in /etc/sysctl.d/99-cis-hardening.conf and run sysctl --system |
| Installer fails writing to /tmp | Temporarily allow execution: mount -o remount,exec /tmp |
| SSH session disconnects | Idle timeout is 15 minutes. Edit /etc/profile.d/cis.sh to change or remove TMOUT |
| NFS/CIFS mounts don't work | Remove the kernel module blacklist: rm /etc/modprobe.d/cis-nfs_common.conf |
Can I use these images with Docker?
Yes, with two changes:
- Enable IP forwarding: set
net.ipv4.ip_forward = 1in/etc/sysctl.d/99-cis-hardening.confand runsysctl --system - Add firewall rules for Docker's bridge network and any exposed ports
How do I check my CIS compliance score?
Install Wazuh agent and run an SCA scan, or use any CIS benchmark scanning tool such as OpenSCAP.
Is monitoring or SIEM included?
The images include auditd for system call auditing and AIDE for file integrity monitoring. No external SIEM or monitoring agent is pre-installed — you can connect your preferred monitoring solution.
Will updates overwrite the hardening?
Standard apt upgrade will not overwrite CIS settings. The hardening is applied via drop-in config files (/etc/ssh/sshd_config.d/, /etc/sysctl.d/, /etc/modprobe.d/), dedicated configs (/etc/nftables.conf, /etc/audit/rules.d/), and PAM configuration (/etc/pam.d/). These are not managed by packages.
ℹ️ Tip: If a package upgrade prompts you about a config file change, choose to keep your current version to preserve the CIS hardening.
Where are all the configuration files?
| Component | Configuration File |
|---|---|
| SSH hardening | /etc/ssh/sshd_config.d/10-cis-hardening.conf |
| Kernel parameters | /etc/sysctl.d/99-cis-hardening.conf |
| Firewall | /etc/nftables.conf |
| Audit rules | /etc/audit/rules.d/cis.rules |
| Audit daemon | /etc/audit/auditd.conf |
| Password quality | /etc/security/pwquality.conf |
| Account lockout | /etc/security/faillock.conf |
| Shell timeout & umask | /etc/profile.d/cis.sh |
| Kernel module blacklists | /etc/modprobe.d/cis-*.conf |
| PAM authentication | /etc/pam.d/common-auth, common-password, common-account |
| Cron allow list | /etc/cron.allow, /etc/at.allow |
| Login banner | /etc/issue, /etc/issue.net |
How to get images?
While we prepare the images for wider release the inital verisons are available for testing now, please reach out to our support for more information
Available Images
| Image | Base | CIS Benchmark |
|---|---|---|
| Ubuntu 24.04 CIS | Ubuntu 24.04 LTS (Noble Numbat) | CIS Ubuntu Linux 24.04 LTS Benchmark v1.0.0 |
| Debian 12 CIS | Debian 12 (Bookworm) | CIS Debian Linux 12 Benchmark v1.1.0 |
Both images are built from the official cloud images with CIS hardening applied at build time. They are available at no additional cost in all BinaryLane regions.
If you require assistance with BinaryLane services, feel free to submit a support ticket at our helpdesk here: Submit a ticket | BinaryLane
Last updated: March 2026
