Other Articles

Servers – Ensure TCP SYN Cookies is Enabled

Secure Configuration Checks > Server

This check ensures that TCP SYN cookies are enabled on the system.

Enabling SYN cookies helps protect against SYN flood attacks and ensures reliable network availability.

Check Details

  • Resource: Server
  • Check: Ensure TCP SYN cookies are enabled
  • Risk: Disabled SYN cookies can make the system vulnerable to SYN flood attacks, leading to denial of service and disruption of legitimate connections.

Remediation Steps

  1. Open a terminal session with root or sudo privileges.
  2. Set the active kernel parameters by running the following commands:

    sysctl -w net.ipv4.tcp_syncookies=1
    sysctl -w net.ipv4.route.flush=1
    
  3. Make the configuration persistent across reboots.
  4. For standard Linux distributions, create or edit the sysctl configuration file:

    sudo nano /etc/sysctl.d/60-netipv4_sysctl.conf
    
  5. Add the following line to the file:

    net.ipv4.tcp_syncookies = 1
    
  6. Alternatively, you can update the main sysctl configuration file:

    sudo nano /etc/sysctl.conf
    
  7. Add the following line:

    net.ipv4.tcp_syncookies = 1
    
  8. Save the file and exit.
  9. Apply the changes:

    sudo sysctl -p
    
  10. Re-run audit commands to confirm the configuration is applied successfully.

Updated on 06 March, 2026