Linux Netfilter discussions
 help / color / mirror / Atom feed
* RE: ddos / no connection tracking / tarpitting
@ 2005-04-22  7:05 Gary W. Smith
  2005-04-22  7:10 ` Taylor Grant
  2005-04-22  7:32 ` Jozsef Kadlecsik
  0 siblings, 2 replies; 16+ messages in thread
From: Gary W. Smith @ 2005-04-22  7:05 UTC (permalink / raw)
  To: Gary W. Smith, Jozsef Kadlecsik, Taylor Grant; +Cc: Vic N, netfilter

Anyone else getting errors when sending to Jozsef on this list.  It's
the only site that has rejected my mail.

The following recipient(s) could not be reached:

      Jozsef Kadlecsik on 4/22/2005 12:02 AM
            There was a SMTP communication problem with the recipient's
email server.  Please contact your system administrator.
            <pxtvjoexd01.pxt.primeexalia.com #5.5.0 smtp;550
<user-119bnnu.biz.mindspring.com[66.149.222.254]>: Client host rejected:
Access denied. Your site is banned because of the unsolicited mail
messages received from it.>


-----Original Message-----
From: netfilter-bounces@lists.netfilter.org
[mailto:netfilter-bounces@lists.netfilter.org] On Behalf Of Gary W.
Smith
Sent: Friday, April 22, 2005 12:02 AM
To: Jozsef Kadlecsik; Taylor Grant
Cc: Vic N; netfilter@lists.netfilter.org
Subject: RE: ddos / no connection tracking / tarpitting

I've got an old p3, 800mhz 1u server with 128mb ram running tarpit with
two external IP's (one low and one high).  This way up/down, down/up
scans all get hung.  It answers on most external ports.  One thing
though, you need to tell it to ignore the broadcast.  When I take the
firewall and bring it back up we have seen some problems (when it starts
it's arp advertisements).

I've also played with mirring SMTP and HTTP but tarpit'ing seems to work
the best.

Has been working fine for some time...


-----Original Message-----
From: netfilter-bounces@lists.netfilter.org
[mailto:netfilter-bounces@lists.netfilter.org] On Behalf Of Jozsef
Kadlecsik
Sent: Thursday, April 21, 2005 11:50 PM
To: Taylor Grant
Cc: Vic N; netfilter@lists.netfilter.org
Subject: Re: ddos / no connection tracking / tarpitting

On Fri, 22 Apr 2005, Taylor Grant wrote:

> > So my question is, is this the basic element of building a good
> > anti-ddos solution wtih iptables to address a *large* volume of ddos
> > traffic to build iptables w/o connection tracking?
>
> Yes this is possible and (I think) fairly easy to do.  As I have never
done this I can not tell you for sure, but this is what I would do if I
were to do such a thing.
>
> I will presume that you are wanting to drop all traffic to a specif
port on an IP address for the sake of this discussion.
>
> iptables -t raw -A PREROUTING -d 1.2.3.4 -p tcp --dport 5678 -j
NOTRACK
> iptables -t filter -A FORWARD -d 1.2.3.4 -p tcp --dport 5678 -j TARPIT
>
> This will cause any traffic that comes in that is distend to 1.2.3.4
on port 5678 to  NOT be tracked with the connecting tracking sub system
and to subsequently be redirected to the TARPIT target.

You *must* use the rule

iptables -t raw -A PREROUTING -s 1.2.3.4 -p tcp --sport 5678 -j NOTRACK

as well, otherwise conntrack will pick up the reply packets from the
TARPIT target.

Best regards,
Jozsef
-
E-mail  : kadlec@blackhole.kfki.hu, kadlec@sunserv.kfki.hu
PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
Address : KFKI Research Institute for Particle and Nuclear Physics
          H-1525 Budapest 114, POB. 49, Hungary




^ permalink raw reply	[flat|nested] 16+ messages in thread
* RE: ddos / no connection tracking / tarpitting
@ 2005-04-22  7:01 Gary W. Smith
  0 siblings, 0 replies; 16+ messages in thread
From: Gary W. Smith @ 2005-04-22  7:01 UTC (permalink / raw)
  To: Jozsef Kadlecsik, Taylor Grant; +Cc: Vic N, netfilter

I've got an old p3, 800mhz 1u server with 128mb ram running tarpit with
two external IP's (one low and one high).  This way up/down, down/up
scans all get hung.  It answers on most external ports.  One thing
though, you need to tell it to ignore the broadcast.  When I take the
firewall and bring it back up we have seen some problems (when it starts
it's arp advertisements).

I've also played with mirring SMTP and HTTP but tarpit'ing seems to work
the best.

Has been working fine for some time...


-----Original Message-----
From: netfilter-bounces@lists.netfilter.org
[mailto:netfilter-bounces@lists.netfilter.org] On Behalf Of Jozsef
Kadlecsik
Sent: Thursday, April 21, 2005 11:50 PM
To: Taylor Grant
Cc: Vic N; netfilter@lists.netfilter.org
Subject: Re: ddos / no connection tracking / tarpitting

On Fri, 22 Apr 2005, Taylor Grant wrote:

> > So my question is, is this the basic element of building a good
> > anti-ddos solution wtih iptables to address a *large* volume of ddos
> > traffic to build iptables w/o connection tracking?
>
> Yes this is possible and (I think) fairly easy to do.  As I have never
done this I can not tell you for sure, but this is what I would do if I
were to do such a thing.
>
> I will presume that you are wanting to drop all traffic to a specif
port on an IP address for the sake of this discussion.
>
> iptables -t raw -A PREROUTING -d 1.2.3.4 -p tcp --dport 5678 -j
NOTRACK
> iptables -t filter -A FORWARD -d 1.2.3.4 -p tcp --dport 5678 -j TARPIT
>
> This will cause any traffic that comes in that is distend to 1.2.3.4
on port 5678 to  NOT be tracked with the connecting tracking sub system
and to subsequently be redirected to the TARPIT target.

You *must* use the rule

iptables -t raw -A PREROUTING -s 1.2.3.4 -p tcp --sport 5678 -j NOTRACK

as well, otherwise conntrack will pick up the reply packets from the
TARPIT target.

Best regards,
Jozsef
-
E-mail  : kadlec@blackhole.kfki.hu, kadlec@sunserv.kfki.hu
PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
Address : KFKI Research Institute for Particle and Nuclear Physics
          H-1525 Budapest 114, POB. 49, Hungary



^ permalink raw reply	[flat|nested] 16+ messages in thread
* ddos / no connection tracking / tarpitting
@ 2005-04-22  4:19 Vic N
  2005-04-22  4:32 ` Jason Opperisano
  2005-04-22  5:22 ` Taylor Grant
  0 siblings, 2 replies; 16+ messages in thread
From: Vic N @ 2005-04-22  4:19 UTC (permalink / raw)
  To: netfilter

A while ago I saw an iptables solution that was able to serve as an 
effective anti-ddos solution.   I didn't get to see under the hood, but the 
creator told me that the solution was essentially an iptables implementation 
with no connection tracking built in.  Allegedly, the fact that no 
connection tracking was used enabled the the iptables to deal with a much 
higher volume of traffic w/o crashing.  He had also mentioned using packet 
counting (to count packets as they passed through since there was no way to 
keep track of them otherwise) and using tarpitting.

While I can't attest to what the person told me, I do know the firewall was 
soaking up ddos traffic that was otherwise bringing servers to their knees 
with the use of regular connection-based firewalling.

So my question is, is this the basic element of building a good anti-ddos 
solution wtih iptables to address a *large* volume of ddos traffic to build 
iptables w/o connection tracking?

Thanks,




^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2005-04-22 23:05 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-22  7:05 ddos / no connection tracking / tarpitting Gary W. Smith
2005-04-22  7:10 ` Taylor Grant
2005-04-22  7:32 ` Jozsef Kadlecsik
  -- strict thread matches above, loose matches on Subject: below --
2005-04-22  7:01 Gary W. Smith
2005-04-22  4:19 Vic N
2005-04-22  4:32 ` Jason Opperisano
2005-04-22  4:45   ` Taylor Grant
2005-04-22  5:01     ` Jason Opperisano
2005-04-22  5:22 ` Taylor Grant
2005-04-22  6:50   ` Jozsef Kadlecsik
2005-04-22  6:52     ` Taylor Grant
2005-04-22 21:13   ` R. DuFresne
2005-04-22 22:12     ` Seferovic Edvin
     [not found]     ` <42697714.011dd32f.69e7.219fSMTPIN_ADDED@mx.gmail.com>
2005-04-22 22:18       ` Fabien Germain
2005-04-22 22:28     ` Taylor, Grant
2005-04-22 23:05     ` Daniel Lopes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox