From: Aleksandar Milivojevic <amilivojevic@pbl.ca>
To: netfilter@lists.netfilter.org
Subject: Re: how to stop broadcasts using iptables
Date: Tue, 27 Apr 2004 09:46:01 -0500 [thread overview]
Message-ID: <408E7229.40001@pbl.ca> (raw)
In-Reply-To: <20040427123529.HVYI23570.viefep19-int.chello.at@localhost>
sschlesi@chello.at wrote:
> hi,
>
> I'm trying to stop broadcasts getting forwarded, but I'm not sure how to do
> this. i read that *.255 - which are afaik broadcast addresses - doesnt
> guarantie that its a broadcast. then i read that its possible by matching the
> mac address, because broadcast will have ff:ff:ff:ff:ff:ff . but I'm not sure
> if that's all nonsense.
IP broadcast address does not need to end with 255. It is convention on
C class subnets to give it address of 255 (all ones), however
theoretically it can be any address, as long as you define it as
broadcast address on all of your machines. If you subnet C class to
even smaller subnets and use "all ones" convetion for broadcast address,
broadcast address will not end in 255 (for example, using "all ones"
convetion, broadcast address of 192.168.1.0/25 would be 192.168.1.127).
Same goes for A or B class subnets (If your network is defined as
192.168.0.0/16, broadcast address (using convention) would be
192.168.255.255, so in this case 192.168.12.255 is not broadcast
address, it's just a host in 192.168.0.0/16).
However, do note that 255.255.255.255 is always valid broadcast address!
The answer to your second question is, yes, on Ethernet
ff:ff:ff:ff:ff:ff is always an (Ethernet) broadcast. Ethernet
broadcasts are not the same as IP broadcast. However, IP broadcasts
packets will be encapsulated into Ethernet broadcast packets (unless you
have something really wrong in your configuraion). Do note that I saw
at least one broken higher level protocol implementation (no, it wasn't
IP) that spit out everything using Ethernet broadcasts.
As David already told you, broadcasts should not be routed (if you want
them to be routed, you usually need to read tips-and-tricks section in
your router configuration, and do something to make it work). So the
router is the place to have them blocked.
--
Aleksandar Milivojevic <amilivojevic@pbl.ca> Pollard Banknote Limited
Systems Administrator 1499 Buffalo Place
Tel: (204) 474-2323 ext 276 Winnipeg, MB R3T 1L7
next prev parent reply other threads:[~2004-04-27 14:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-27 12:35 how to stop broadcasts using iptables sschlesi
2004-04-27 12:50 ` David Cannings
2004-04-28 0:11 ` Alexander Samad
2004-04-27 14:46 ` Aleksandar Milivojevic [this message]
2004-04-27 15:40 ` Angel j Alvarez
-- strict thread matches above, loose matches on Subject: below --
2004-04-27 13:19 sschlesi
2004-04-27 14:56 ` Aleksandar Milivojevic
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=408E7229.40001@pbl.ca \
--to=amilivojevic@pbl.ca \
--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