TMAegis
More rules for linux

TMA-LNX-NET-SYNCOOKIES

Ensure TCP SYN cookies are enabled

MediumLevel 1Automatedlinux

Description

Kernel parameter net.ipv4.tcp_syncookies should be 1.

How it is checked

Audit method: Shell command

shell
sysctl -n net.ipv4.tcp_syncookies
Expected output
1

How it is fixed

Fix method: Shell command

shell
sysctl -w net.ipv4.tcp_syncookies=1 && printf 'net.ipv4.tcp_syncookies = 1\n' > /etc/sysctl.d/60-tmaegis-net_ipv4_tcp_syncookies.conf

Properties

Operating systems
ubuntu-22.04, ubuntu-24.04, rocky-9
Tags
kernelsysctlnetwork
Reference
CIS Linux Benchmark - Network Configuration / Kernel Parameters (verify section number for your distro release)

Check this host

Run this on a machine you are allowed to audit. The scan is read-only.

shell
tmaegis scan --target linux