Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
World desk6 min

Linux Kernel Hardening Settings: Which Security Features to Enable on a Server

Enable supported kernel protections, maintain an enforcing SELinux or AppArmor policy, test seccomp for services, and restrict module loading where operations allow. Avoid universal sysctl checklists: defaults and safe settings depend on the distribution, kernel, boot chain, and workload.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For most Linux servers, the best starting point is a supported, patched distribution kernel with its built-in self-protections intact, an enforcing SELinux or AppArmor policy, and tested seccomp restrictions for services that support them. Restrict kernel module loading when the server’s drivers and recovery process allow it. Treat KASLR and controls on kernel-address exposure as additional layers, not substitutes for patching or access controls. There is no single safe sysctl checklist for every distribution, kernel version, boot chain, and workload.

Start with a layered baseline, not a bag of sysctls

Kernel hardening reduces opportunities for an attacker to exploit a flaw or reach sensitive kernel interfaces; it cannot guarantee a secure server. The Linux kernel’s threat model describes protections as part of a broader security approach, not as a promise that vulnerabilities cannot be exploited. Read the Linux kernel threat model.

Prioritize controls in this order:

  1. Keep the distribution-supported kernel and security updates current. Avoid replacing a supported kernel with an unmaintained build or disabling protections to work around a compatibility problem without understanding the consequences.
  2. Use the distribution’s supported LSM policy in enforcing mode. SELinux and AppArmor can restrict what a process may do, but the service needs an effective policy—not merely framework support or a package installed.
  3. Reduce each service’s system-call surface with a tested seccomp policy. Prefer a profile maintained for the application, service manager, or container runtime, and verify the service lifecycle against it.
  4. Limit arbitrary kernel-module loading where practical. Choose a control compatible with required drivers, hardware changes, updates, and recovery.
  5. Keep kernel self-protection, KASLR, and address-exposure protections enabled where supported. These make some attacks harder but do not replace patching, least privilege, or confinement.

Upstream documentation explains the mechanisms, while distribution documentation determines supported behavior and defaults. The kernel’s Kernel Self-Protection guide covers several of these layers; it does not define one universal server configuration.

Keep kernel self-protection and memory permissions intact

Kernel self-protection includes measures designed to reduce attack surface and make memory corruption harder to exploit. Strict permissions aim to prevent executable code from being writable, data from being executable, and read-only data from being changed. The upstream documentation says most architectures enable relevant strict kernel and module read/write/execute protections by default, but implementation and configurability vary by architecture. Keep the distribution’s supported settings rather than assuming every kernel exposes identical controls. Kernel Self-Protection documentation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
UGREEN NAS DH2300 2-Bay for Beginners & Personal Users, Phone Backup
  • Entry-level NAS Personal Storage:UGREEN NAS DH2300 is your first and best NAS made easy. It is designed for beginners who want a simple, private way to store videos, photos and personal files, which is intuitive for users moving from cloud storage or external drives and move away from scattered date across devices. This entry-level NAS 2-bay perfect for personal entertainment, photo storage, and easy data backup (doesn't support Docker or virtual machines).
  • Set Your Devices Free, Expand Your Digital World: This unified storage hub supports massive capacity up to 64TB.*Storage drives not included. Stop Deleting, Start Storing. You can store 22 million 3MB images, or 2 million 30MB songs, or 43K 1.5GB movies or 67 million 1MB documents! UGREEN NAS is a better way to free up storage across all your devices such as phones, computers, tablets and also does automatic backups across devices regardless of the operating system—Window, iOS, Android or macOS.
  • The Smarter Long-term Way to Store: Unlike cloud storage with recurring monthly fees, a UGREEN NAS enclosure requires only a one-time purchase for long-term use. For example, you only need to pay $459.98 for a NAS, while for cloud storage, you need to pay $719.88 per year, $2,159.64 for 3 years, $3,599.40 for 5 years. You will save $6,738.82 over 10 years with UGREEN NAS! *NAS cost based on DH2300 + 12TB HDD; cloud cost based on 12TB plan (e.g. $59.99/month).
  • Blazing Speed, Minimal Power: Equipped with a high-performance processor, 1GbE port, and 4GB RAM on Board, this NAS handles multiple tasks with ease. File transfers reach up to 125MB/s—a 1GB file takes only 8 seconds. Don't let slow clouds hold you back; they often need over 100 seconds for the same task. The difference is clear.
  • Let AI Better Organize Your Memories: UGREEN NAS uses AI to tag faces, locations, texts, and objects—so you can effortlessly find any photo by searching for who or what's in it in seconds. It also automatically finds and deletes similar or duplicate photo, backs up live photos and allows you to share them with your friends or family with just one tap. Everything stays effortlessly organized, powered by intelligent tagging and recognition.

KASLR and kernel-address exposure

Kernel Address Space Layout Randomization (KASLR) varies kernel memory placement, making attacks that rely on predictable addresses harder. It is probabilistic: an information leak may weaken the benefit. Preserve it where supported, but do not treat it as a barrier that makes patching or access restrictions unnecessary.

Kernel-address exposure controls can make it harder for unprivileged users to obtain addresses useful in an exploit. Ubuntu’s kernel-protection guidance discusses settings such as kernel.kptr_restrict; exact defaults and recommended values are distribution- and version-specific. Check the official documentation for the system you administer rather than copying an Ubuntu value to another distribution. Ubuntu: Kernel protections.

Rank #2
Pixiecube Linux Commands Line Mouse pad - Extended Large Cheat Sheet Mousepad. Shortcuts to Kali/Red Hat/Ubuntu/OpenSUSE/Arch/Debian/Unix Programmer. XXL Non-Slip Gaming Desk mat
  • LINUX COMMANDS. ZERO SEARCHING. – Keep essential Linux and Unix command lines directly beneath your fingertips, so you can code, troubleshoot and work faster without breaking focus.
  • YOUR DESK. SMARTER. – Commands are clearly grouped by networking, directory navigation, processes, users, files and system management for quick answers exactly when you need them.
  • BUILT FOR EVERY LINUX USER – A practical go-to reference for beginners and seasoned programmers working with Kali, Red Hat, Ubuntu, openSUSE, Arch, Debian and other distributions.
  • ROOM TO CODE, WORK & PLAY – The extended 31.5 x 11.8-inch Pixiecube desk mat provides ample space for a laptop or keyboard and mouse, while the soft 2 mm surface adds everyday comfort.
  • BUILT FOR REAL-WORLD WORKDAYS – A rugged stitched edge helps prevent fraying, and the water-resistant, stain-resistant surface protects against scratches, spills and everyday wear—because smarter desks should work harder.

Choose an LSM policy your distribution and team can maintain

Linux Security Modules (LSMs) provide hooks for security checks. SELinux and AppArmor are two commonly used LSM approaches; the kernel also documents other modules. Check the active LSM list on a system with securityfs available by reading /sys/kernel/security/lsm. That shows active modules, but by itself does not prove that a particular service is confined or that its policy is enforcing. Linux Security Module Usage.

Decision factor SELinux AppArmor
What should decide Whether your distribution supplies and supports the policy and whether your operators can maintain it. Whether your distribution supplies and supports the profiles and whether your operators can maintain them.
What to verify That the intended policy is loaded and enforcing for the services in scope. That the intended profile is loaded and enforcing for the services in scope.
Key operational consideration Plan for policy maintenance, audit review, and troubleshooting application denials. Profiles are task-centered; a task without a loaded profile is unconfined by AppArmor beyond ordinary discretionary access controls.

Both can contribute meaningful confinement; the practical choice is the one supported by the distribution and maintained by the team. AppArmor’s documentation specifically notes that userspace must load a profile before it can enforce restrictions beyond standard discretionary access control. AppArmor documentation. Do not change LSM selection or boot parameters based on instructions for a different distribution.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
HPE Hewlett Packard Enterprise ProLiant MicroServer Gen11 Tower Server, Intel Pentium Gold G7400 Processor, 16GB Memory, 1TB HDD Storage, External 180W US Power Supply Smart Choice P74439-005
  • MODEL P74439-005: Compact and affordable HPE ProLiant MicroServer Gen11 powered by Intel Pentium Gold G7400 3.7GHz processor, ideal for file sharing, NAS, and basic business workloads
  • READY OUT OF THE BOX: Includes 16GB DDR5 UDIMM memory (expandable to 128GB), one 1TB SATA 6G Business Critical HDD, embedded Intel VROC SATA, dedicated iLO-M.2 port kit, 180w external power adapter and 1/1/1 warranty for dependable plug-and-play server operation
  • WHISPER-QUIET & SPACE-SAVING: Ultra-compact mini tower design fits easily in small office spaces; supports wall, flat, or vertical placement for deployment flexibility
  • INTEGRATED REMOTE MANAGEMENT: Comes with HPE iLO 6 and embedded TPM 2.0 for secure, license-free remote server administration through shared port access
  • EXPANDABLE DESIGN: Two PCIe slots (including PCIe 5.0) and four LFF-NHP drive bays provide robust options for storage and component scalability. Features new MR408i-p controller support for enhanced storage performance

Apply seccomp to services, then test real workloads

Seccomp is an opt-in userspace mechanism for reducing the system calls available to a running process. As the Linux kernel documentation puts it, “The ‘seccomp’ system provides an opt-in feature made available to userspace, which provides a way to reduce the number of kernel entry points available to a running process.” Seccomp BPF documentation.

Use a profile suited to the actual program, preferably one supplied or maintained by the service manager, application, or container runtime. A filter that is too strict can break legitimate operations; test the complete service lifecycle under the policy, including startup, routine work, upgrades, diagnostics, and recovery. Seccomp limits system calls; it does not express every logical behavior or information-flow policy. Pair it with other controls, including an effective LSM policy where appropriate.

For containers and Kubernetes

Apply host protections as well as workload-level controls, and keep container privileges to the minimum required. Kubernetes warns that privileged containers can override or undo protections such as seccomp, AppArmor, or SELinux constraints. A policy selected for a pod is therefore not a substitute for controlling whether that workload receives privileged access. Kubernetes: Linux kernel security constraints for Pods and containers.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Restrict kernel-module loading with an operations plan

Kernel modules add code to the kernel, so preventing unprivileged users from loading arbitrary modules reduces one route for introducing kernel code. The kernel self-protection guide discusses signed modules and disabling module loading as possible controls. Which approach is appropriate depends on the server’s required drivers, how hardware and kernel updates are handled, and how administrators recover the system. Kernel Self-Protection documentation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Sale
KAMRUI Essenx E2 Mini PC, AMD Ryzen 5 3500U(4 Cores, 8 Threads, Up to 3.7GHz), 16GB DDR4(Expandable) 256GB M.2 SSD Micro PC, HDMI+DP Dual 4K@60Hz Display Home/Business/Office Mini Desktop Computers
  • 【Ryzen 5 3500U Processor】KAMRUI Essenx E2 Mini PC is equipped with AMD Ryzen 5 3500U (4-cores/8-threads, up to 3.7GHz) with integrated Radeon Vega 8 Graphics(1200MHz, 8 Core). The 3500U CPU operates at a base frequency of 2.1 GHz and a Boost frequency of 3.7 GHz. This DDR supports upgradable up to 32GB, SSD supports up to 2TB.(NOT INCLUED), KAMRUI E2 3500U Mini PC is ideal for light office work and home entertainment. KAMRUI E2 3500U is more than 35% more powerful and smoother in operation than the Intel N150, 33% faster than Intel N95, 28% performance boost over Intel i3-10110U, and 42% stronger processing power than AMD Ryzen 3 3200U.
  • 【16GB DDR4 & 256GB SSD】The KAMRUI E2 mini computers is equipped with 16GB DDR4(Expandable up to 32GB) for faster multitasking and smooth application switching. 256GB M.2 SSD ensures fast startup times,fast file transfers and plenty of storage space,eliminating slow loading times and ensuring fast responsiveness.Storage space can RAM supports up to 32 GB, SSD supports up to 2TB (Not included)make file storage easier.
  • 【4K Dual Display & USB 3.2 Type-A Port】KAMRUI E2 3500U mini desktop pc is equipped with an HDMI 2.0+DP 1.4 interfaces for faster transmission, Support Dual 4K@60Hz Display, E2 mini desktop computers is ideal for visual home entertainment, home office, conference rooms, etc. USB3.2 Gen1 Type-A Port×2 with a transfer speed of up to 5Gbps (10 times faster than USB 2.0) for efficient data transfer. The RJ45 1000M Gigabit Ethernet Port ensures a stable network connection.
  • 【WiFi+Bluetooth stable connection】The Kamrui E2 micro pc have reliable and stable wireless connection, open websites in seconds, watch movies without buffering and download files smoothly, connect your monitor from WiFi or Ethernet, use a wireless keyboard and mouse through bluetooth, which will be powerful workstation for you.
  • 【Versatile Ports】This KAMRUI E2 Small pc is equipped with HDMI 2.0×1(4K@60Hz)、DP1.4×1(4K@60Hz)、Gigabit Ethernet Port (RJ45, 10/100/1000Mbps) ×1、USB3.2 Gen1 Type-A Port×2(5Gbps)、USB2.0 Type-A Port×2、3.5mm Audio Jack ×1、DC In ×1、Power Button ×1
  • Inventory required built-in and loadable drivers, including any externally supplied modules.
  • Confirm how module signing and boot integrity are handled in the target distribution and environment.
  • Test kernel and hardware updates before enforcing a restriction that could prevent a needed driver from loading.
  • Document an authorized recovery route before disabling module loading.

Kernel lockdown may also be available, but its effects and enablement depend on the kernel configuration, LSM initialization, distribution, and boot chain. Confirm the distribution’s official guidance before relying on it or asserting a default; do not assume one command or policy applies to every server.

Use sysctls only for a defined, verified need

Sysctls can adjust kernel behavior, including some exposure controls, but the available documentation does not establish a complete set of numeric values that is safe for every Linux server. Defaults differ by distribution and version, and changes can affect compatibility. Avoid applying a copied “hardening” file wholesale without establishing what each value does on the target system.

  1. Identify the risk and the exact setting. Tie each proposed change to a specific threat or requirement instead of treating a long checklist as a baseline.
  2. Check the target distribution’s current documentation and effective value. Ubuntu’s kernel-protection page describes Ubuntu behavior; it should not be projected onto Debian, RHEL, SUSE, or other systems without their own guidance.
  3. Test compatibility and persistence. Verify the change survives the intended reboot or configuration-management process and does not disrupt the workload.
  4. Record how to verify and revert it. Keep an operational path to detect a failed or incompatible setting and restore service.

The French National Cybersecurity Agency’s Linux configuration guide is another configuration reference, but its recommendations should be checked against the target system and current policy rather than treated as a universal, version-independent baseline. ANSSI: Configuration Recommendations.

Match the control to the server’s constraints

Choice What to weigh Practical direction
SELinux or AppArmor Distribution support, available policy, operator skill, application compatibility, and audit and troubleshooting workflow. Use the supported option for which the team can maintain an effective enforcing policy.
Seccomp strictness System calls the workload needs, profile maintenance, runtime support, and diagnostic impact. Reduce the available system-call surface while testing actual service behavior.
Signed modules or disabled loading Required drivers, hardware lifecycle, update process, boot integrity, and recovery access. Restrict arbitrary loading with the mechanism compatible with the server’s module and operations model.
Host and container controls Workload privilege, runtime policy, host LSM, capabilities, and administrative boundaries. Layer host and workload protections; avoid privileged containers unless the workload requires them.
Distribution defaults or custom sysctls Distribution and version, threat model, compatibility, persistence, and verification. Keep supported defaults unless a defined risk justifies a tested change.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Shenzhen desk3 min
    HONOR Expands Beyond Smartphones With Humanoid Robot RevealHONOR said it unveiled its first humanoid robot at MWC 2026 and named shopping assistance, workplace inspections, and supportive companionship as intended uses. Later Robotics D1 claims and a reported…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.