Cheat Sheets

Network - SYN Cookie Protection

Description

Ensures that SYN cookies are enabled.

Solution

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

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

#!/bin/bash

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