Linux Netfilter discussions
 help / color / mirror / Atom feed
* efficient source address filtering and logging?
@ 2003-10-28 14:59 Robert P. J. Day
  2003-10-28 15:26 ` James Pattie
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Robert P. J. Day @ 2003-10-28 14:59 UTC (permalink / raw)
  To: iptables mailing list


  i'd like to find a short, efficient way to filter incoming packets with
bogus source addresses, but i don't see an elegant way of doing it.

  as we all know, there are a number of clearly bogus source addresses on
incoming packets:

  - broadcast
  - your own IP address
  - any of the private class A, B or C addresses
  - class D addresses

and on and on.  so it's natural to want to discard them and, just for fun,
log them as well.

  for elegance, i can create a user-defined chain called, say,
"reject_bad_source_addresses" to which i jump with every incoming packet.  
this user-defined chain will test for all of the bad source addresses, one
at a time, and DROP/REJECT each one.  however, if i want to log all of 
these rejections, i'd have to double the number of rules in this chain,
so that each test would first LOG that packet, then be followed by a 
second rule to DROP it.  kind of a pain.

  if i could rewrite the rules all backwards, i could have the 
user-defined chain full of ACCEPT rules, and only terminate the chain with 
a rule for LOG, followed by one for DROP.  but i don't see how that's 
possible.

  so, is there a solution i'm missing that's clean, elegant and short?

rday



^ permalink raw reply	[flat|nested] 12+ messages in thread
[parent not found: <20031028165927.11207.15406.Mailman@netfilter-sponsored-by.noris.net>]

end of thread, other threads:[~2003-11-04  3:55 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-28 14:59 efficient source address filtering and logging? Robert P. J. Day
2003-10-28 15:26 ` James Pattie
2003-10-28 15:32   ` Robert P. J. Day
2003-10-28 15:30 ` Alistair Tonner
2003-10-28 15:33   ` Robert P. J. Day
2003-10-28 16:26 ` Chris Brenton
2003-11-02 10:29   ` Re[2]: " Peteris Krumins
2003-11-02 11:45     ` Chris Brenton
2003-11-02 13:35       ` Alistair Tonner
2003-11-02 13:48       ` Alistair Tonner
2003-11-04  3:55         ` Tarek W.
     [not found] <20031028165927.11207.15406.Mailman@netfilter-sponsored-by.noris.net>
2003-10-28 17:25 ` Earl A.Killian

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