sysctl -w net.ipv4.tcp_syncookies=1

Category: Security & Hardening

sysctl -w net.ipv4.tcp_syncookies=1

Enable TCP SYN cookies against floods

Turns on SYN cookies, a kernel defense that keeps a SYN flood from exhausting connection slots, a common denial-of-service technique. The -w flag writes the value live. Persist it by adding net.ipv4.tcp_syncookies=1 to /etc/sysctl.d/ and running sysctl -p.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.