SYN packet attack

Discussion in 'Security' started by Namespacestd, Dec 3, 2010.

  1. #1
    Are there any working scripts that will help defend my site from weak syn packet attacks?
     
    Namespacestd, Dec 3, 2010 IP
  2. SysAssist

    SysAssist Peon

    Messages:
    10
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Try the following to prevent syn flood (it will limit to 80 per sec, you can set the limit much lower or higher according to your needs.)

    iptables -A INPUT -m state --state NEW -p tcp -m tcp --syn -m recent --name synflood --set
    iptables -A INPUT -m state --state NEW -p tcp -m tcp --syn -m recent --name synflood --update --seconds 1 --hitcount 80 -j DROP
    Code (markup):
     
    SysAssist, Dec 5, 2010 IP
  3. Namespacestd

    Namespacestd Peon

    Messages:
    16
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks, this worked, at least I know noticed a huge change in load times.
     
    Namespacestd, Dec 11, 2010 IP
  4. SysAssist

    SysAssist Peon

    Messages:
    10
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    No problem, glad it helped you out.
    If you need any more help, contact me via pm. :)
     
    SysAssist, Dec 12, 2010 IP
  5. usf

    usf Active Member

    Messages:
    53
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    91
    #5
    When I run I get this error::

    root@ [~]# iptables -A INPUT -m state --state NEW -p tcp -m tcp --syn -m recent --name synflood --set
    root@ [~]# iptables -A INPUT -m state --state NEW -p tcp -m tcp --syn -m recent --name synflood --update --seconds 1 --hitcount 80 -j DROP
    iptables: Unknown error 18446744073709551615


    And When I check for this::

    root@ [~]# lsmod | grep ipt
    ipt_TCPMSS 37313 1
    iptable_filter 36161 1
    ipt_ULOG 42569 0
    ipt_TOS 35265 2
    ipt_ttl 34881 0
    iptable_mangle 36033 1
    ipt_owner 35009 0
    ipt_LOG 39617 0
    ipt_REJECT 38977 42
    ipt_recent 42969 1
    ipt_ecn 35265 0
    ip_tables 55201 2 iptable_filter,iptable_mangle
    x_tables 50505 17 xt_tcpudp,xt_state,xt_conntrack,xt_mac,xt_length,xt_limit,xt_multiport,ipt_TCPMSS,ipt_ULOG,ipt_TOS,ipt_ttl,ipt_owner,ipt_LOG,ipt_REJECT,ipt_recent,ipt_ecn,ip_tables
     
    usf, Jan 5, 2011 IP