Cheat Sheets

Network - SYN Cookie Protection

Description

Ensures that SYN cookies are enabled.

Tags

  • CCE-27053-8

Solution

echo 'net.ipv4.tcp_syncookies=1' >/etc/sysctl.d/50-net.ipv4.tcp_syncookies.conf

Check Script: network-syn-cookies-on.sh

if [[ $(/sbin/sysctl -n net.ipv4.tcp_syncookies 2>/dev/null) == 1 ]]; then
	result_failed "net.ipv4.tcp_syncookies is not enabled"
fi