All of lore.kernel.org
 help / color / mirror / Atom feed
From: Antony Stone <Antony@Soft-Solutions.co.uk>
To: netfilter@lists.netfilter.org
Subject: Re: Filter out broadcast messages
Date: Wed, 7 Jan 2004 21:58:32 +0000	[thread overview]
Message-ID: <200401072158.32985.Antony@Soft-Solutions.co.uk> (raw)
In-Reply-To: <BAY10-F77TIFprhMOgR0003cd8a@hotmail.com>

On Wednesday 07 January 2004 9:44 pm, Gabby James wrote:

> Hi,
>
> I would like to filter out all broadcast messages.  The packets could come
> from 255.255.255.255 or multiple other addresses of the form 10.*.*.255.
> What kind of syntax do I use to DROP these packets?  The line below will
> filter out packets from 255.255.255.255 but I'm not sure what syntax to use
> to DROP the other adresses.

Should be quite simple really - all you need to know is how many ethernet 
interfaces are on your firewall, and the broadcast address for each (unless 
you've got more than one subnet bound to a single ethernet port, ugh).

Remember that broadcast packets do not get routed, therefore you only ned to 
be concerned with subnets which are local to your firewall.

Unless you have an unusual setup, I'll bet that's no more than three.

It wouldn't be at all hard to script automatically, either.   Start with 
something like:

for a in `/sbin/ifconfig | grep Bcast | tr -s ':' ' ' | cut -d' ' -f6`
do
  iptables -A INPUT -d $a -j DROP
done

Regards,

Antony.

-- 
Anyone that's normal doesn't really achieve much.

 - Mark Blair, Australian rocket engineer

                                                     Please reply to the list;
                                                           please don't CC me.



  reply	other threads:[~2004-01-07 21:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-07 21:44 Filter out broadcast messages Gabby James
2004-01-07 21:58 ` Antony Stone [this message]
2004-01-07 22:02 ` Eric Leblond
2004-01-07 22:05 ` Antony Stone
  -- strict thread matches above, loose matches on Subject: below --
2004-01-08 14:20 Gabby James

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=200401072158.32985.Antony@Soft-Solutions.co.uk \
    --to=antony@soft-solutions.co.uk \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.