Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Feb 2004 18:33:14 +0200
From:      Anton Alin-Adrian <aanton@reversedhell.net>
To:        freebsd-questions@freebsd.org
Cc:        freebsd-security@freebsd.org
Subject:   Re: SYN Attacks - how i cant stop it
Message-ID:  <402CFC4A.7020702@reversedhell.net>
In-Reply-To: <MIEPLLIBMLEEABPDBIEGKEPEFKAA.Barbish3@adelphia.net>
References:  <MIEPLLIBMLEEABPDBIEGKEPEFKAA.Barbish3@adelphia.net>

next in thread | previous in thread | raw e-mail | index | archive | help
JJB wrote:
> You talk about the net.inet.tcp.syncookies=1 knob,
> how about an description on what it does and why you
> are recommending using it.

The net.inet.tcp.syncookies 'knob', if set to 1, enables syn cookies. 
Syn cookies were invented specifically for syn flood protection. A brief 
description of syncookies idea can be read here:

http://cr.yp.to/syncookies.html

> How would one go about mirroring back the attackers
> syn packets to port 80 or 22?
> Please describe this easy method of yours.
> 

Mirroring back packets to the attacker is, first of all, a nasty thing. 
Secondly, it is only possible if the attacker's IP is known. If it is 
not known, then obviously it's not possible.

Knowing the attacker's IP does not necessarly mean that he is performing 
the current attacks from that IP.

Packet redirection with ipfw is done using divert sockets. One needs to 
have it compiled into the kernel. Divert sockets are also used by ipfw 
nat redirection. It's all in the man pages of ipfw.

If the flood is severly intense (from the point of stack memory 
exhaution), it might be a good improvement to drop 5% of incoming SYN 
packets. This can also be done with ipfw, and is described in the manual 
pages. However, I don't think one would ever come to this.

Asking the ISP to put the server behind a decent cisco router, and 
implement syn cookies on hardware devices, is the best protection.

-- 
Alin-Adrian Anton
Reversed Hell Networks
GPG keyID 0x1E2FFF2E (2963 0C11 1AF1 96F6 0030 6EE9 D323 639D 1E2F FF2E)
gpg --keyserver pgp.mit.edu --recv-keys 1E2FFF2E



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?402CFC4A.7020702>