1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

SYN Cookies

Discussion in 'Security' started by Haruspex, Aug 20, 2009.

  1. #1
    Hi,

    So yesterday, someone thought it would be funny to SYN flood my server causing everything to lock up.

    I did some digging on SYN flood protection and found out about SYN cookies.

    However, when I try to enable them in SSH as root using this command:

    echo 1 > /proc/sys/net/ipv4/tcp_syncookies

    I get an "Operation not permitted" error.

    I'm not used to dealing in detail with Linux servers or SSH.

    Any help would be appreciated,

    Thanks!
     
    Haruspex, Aug 20, 2009 IP
  2. GNetCoder

    GNetCoder Peon

    Messages:
    68
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Are you sure you are logged in as root? If not you can typically do this:

    sudo echo 1 > /proc/sys/net/ipv4/tcp_syncookies

    Will allow you to perform the command as a privileged user.

    Also, off the top of my head - Doublecheck that this file (/proc/sys/net/ipv4/tcp_syncookies) exists; you may have a different linux distro that stores this info differently.
     
    GNetCoder, Aug 21, 2009 IP
  3. bulkemailpp

    bulkemailpp Peon

    Messages:
    26
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    See Version 6.2 http://www.faqs.org/docs/securing/chap5sec56.html
     
    bulkemailpp, Aug 24, 2009 IP
  4. Ladadadada

    Ladadadada Peon

    Messages:
    382
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    0
    #4
    The command

    sudo echo 1 > /proc/sys/net/ipv4/tcp_syncookies

    Will NOT work. Allthough the "echo 1" is run as root, redirecting the output into a file (or pseudo file) is done with the permissions of the user.

    Run the command

    id -a

    To find out which user you are currently and if you are not root, use

    sudo -s
     
    Ladadadada, Sep 2, 2009 IP