Linux Netfilter discussions
 help / color / mirror / Atom feed
From: "Alberto Ferrer" <albertoferrer@gmail.com>
To: mogensv@vip.cybercity.dk
Cc: netfilter@lists.netfilter.org
Subject: Re: How stop DoS and SYN attack..
Date: Mon, 5 Jun 2006 11:10:53 -0300	[thread overview]
Message-ID: <e32f231c0606050710xee283dei3b82dcbbbf76ad@mail.gmail.com> (raw)
In-Reply-To: <44841859.2060209@vip.cybercity.dk>

Solved at moment, some bad boy its doing a syn flood to my webserver
with 38.000 ips, i want die :) , for now, iptables and mod_evasive its
winning.

2006/6/5, Mogens Valentin <mogensv@vip.cybercity.dk>:
> Alberto Ferrer wrote:
> > i got a lot of:
> >
> > Jun  5 00:19:29 lnx1 kernel: [4322108.323000] fp=bad_packets:1 a=DROP
> > IN=eth0 OUT= MAC=00:08:54:2f:8a:ac:00:0b:46:e2:04:00:08:00
> > SRC=201.231.52.141 DST=200.68.95.25 LEN=40 TOS=0x00 PREC=0x00 TTL=248
> > ID=0 PROTO=TCP SPT=53176 DPT=80 WINDOW=0 RES=0x00 RST URGP=0
> >
> > Jun  5 00:19:34 lnx1 kernel: [4322112.926000] fp=INPUT:99 a=DROP
> > IN=eth0 OUT= MAC=00:08:54:2f:8a:ac:00:0b:46:e2:04:00:08:00
> > SRC=200.68.126.88 DST=200.68.95.27 LEN=48 TOS=0x00 PREC=0x00 TTL=119
> > ID=44694 DF PROTO=TCP SPT=1196 DPT=445 WINDOW=8760 RES=0x00 SYN URGP=0
> >
> > Jun  5 00:19:35 lnx1 kernel: [4322113.710000] fp=INPUT:99 a=DROP
> > IN=eth0 OUT= MAC=00:08:54:2f:8a:ac:00:0b:46:e2:04:00:08:00
> > SRC=200.68.126.88 DST=200.68.95.28 LEN=48 TOS=0x00 PREC=0x00 TTL=119
> > ID=44762 DF PROTO=TCP SPT=1134 DPT=445 WINDOW=8760 RES=0x00 SYN URGP=0
> >
> > Jun  5 00:19:36 lnx1 kernel: [4322114.558000] fp=INPUT:99 a=DROP
> > IN=eth0 OUT= MAC=00:08:54:2f:8a:ac:00:0b:46:e2:04:00:08:00
> > SRC=200.68.126.88 DST=200.68.95.27 LEN=48 TOS=0x00 PREC=0x00 TTL=119
> > ID=44873 DF PROTO=TCP SPT=1196 DPT=445 WINDOW=8760 RES=0x00 SYN URGP=0
> >
> > Jun  5 00:19:39 lnx1 kernel: [4322117.587000] fp=bad_packets:1 a=DROP
> > IN=eth0 OUT= MAC=00:08:54:2f:8a:ac:00:0b:46:e2:04:00:08:00
> > SRC=201.254.155.13 DST=200.68.95.25 LEN=40 TOS=0x00 PREC=0x00 TTL=244
> > ID=0 PROTO=TCP SPT=28837 DPT=80 WINDOW=0 RES=0x00 RST URGP=0
> >
> > My website its working a bit slow now ^^ and my ISP says: "you can
> > block that by your self" .
>
> And rightfully so; this is your own problem. No pun intended :)
>
> Looking at your presended dumps, you see DPT=445:
>    grep 445 /etc/services
>    microsoft-ds    445/tcp
>    microsoft-ds    445/udp
>
> Those are requests to MS directory services, coming in on your internet
> interface (so it looks), and correctly being blocked.
> Your only problem may be the number of those, which you may do something
> about using iptables limit targets.
>
> The DTP=80 are requests to either your webserver (do you have one
> running?), or to a assumed running webserver.
> You may wanna have a look at which services are running behind, or at,
> the firewall, whether or not those are secured by themselves.
>
> > ¿What distro is most prepared for this?
>
> The one you know the best ;) No, seriously, I don't know. Thay can all
> be used. It's not a that much a matter of which distro, but go through
> the kernel setup, read in /usr/src/linux/Documentation about what you
> can do with in /proc or with sysctl, and read about iptables.
> For a distro, I'd suggest Slackware, partly because I know ot well,
> partly because it doesn't have all those wrapper mechanisms other
> distros have, so it's simple to find out how things works, plus per
> default it's setup quite safe.
> However, no distros I know of, can do anything about your specific kind
> of traffic. It's up to you to define measures against such.
>
> > 2006/6/3, Mogens Valentin <mogensv@vip.cybercity.dk>:
> >
> >> Alberto Ferrer wrote:
> >> > ¿any know a way to stop via Linux with iptables or related a SYN
> >> attack ?
> >> > ¿where i can read something related to this?
> >>
> >>    # Enable syn-cookies (prevent syn-flood attacks):
> >>      echo "1" >/proc/sys/net/ipv4/tcp_syncookies
> >>
> >>    # Reduce number of possible SYN Floods:
> >>      echo "1024" >/proc/sys/net/ipv4/tcp_max_syn_backlog
> >>
> >> Helps somewhat. Can also be set via sysctl.
> >> You may wan't to look into iptables docs for the 'limit' module:
> >>
> >>    -m limit --limit X/sec
>
> Again, take a look a the limits target in iptables.
>
> --
> Kind regards,
> Mogens Valentin
>
>


-- 
bet0x


  parent reply	other threads:[~2006-06-05 14:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-03 20:33 How stop DoS and SYN attack Alberto Ferrer
2006-06-03 21:54 ` Mogens Valentin
     [not found]   ` <e32f231c0606042021t2a80a4det5ed2beeed11e19c5@mail.gmail.com>
     [not found]     ` <44841859.2060209@vip.cybercity.dk>
2006-06-05 14:10       ` Alberto Ferrer [this message]
2006-06-05 14:59         ` Brent Clark
     [not found]           ` <e32f231c0606060608o6ce1619p3de97cbf2030d0f5@mail.gmail.com>
2006-06-06 13:19             ` Brent Clark
2006-06-06 13:22               ` Alberto Ferrer
2006-06-06 13:20             ` Brent Clark
  -- strict thread matches above, loose matches on Subject: below --
2006-06-04  7:57 Sietse van Zanen
2006-06-06 14:55 ` Jeho Park
2006-06-06 15:36   ` Alberto Ferrer
2006-06-06 17:22     ` Jeho Park
2006-06-06 18:00       ` R. DuFresne

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e32f231c0606050710xee283dei3b82dcbbbf76ad@mail.gmail.com \
    --to=albertoferrer@gmail.com \
    --cc=mogensv@vip.cybercity.dk \
    --cc=netfilter@lists.netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox