From: "H. Peter Anvin" <hpa@zytor.com>
To: lkml@makubi.at
Cc: arndbergmann@googlemail.com, linux-kernel@vger.kernel.org
Subject: Re: DHCP and iptables
Date: Mon, 12 Oct 2009 15:45:58 -0700 [thread overview]
Message-ID: <4AD3B1A6.10508@zytor.com> (raw)
In-Reply-To: <20091012235013.16174ciovvwpw70g@www.kundendienste.net>
On 10/12/2009 02:50 PM, lkml@makubi.at wrote:
> Well, I just looked for "ethernet protocol" and read some things about
> DHCP again.
>
> What's an ethernet protocol?
>
> I also read, that "DHCP is built directly on UDP and IP" (RFC 2131).
>
> It uses Ports (UDP 67/68) and the source address of the DHCP server is
> an IP address.
>
> Could you answer me more in detail, why I get an IP, but block
> everything with iptables?
>
The reason is that the DHCP client bypasses the Linux IP stack
completely (because it has special requirements.)
> | | DHCP is an ethernet protocol, not an IP protocol, so you have to use
> | | ebtables instead of iptables to filter it.
> | |
> | | Arnd <><
This is actually incorrect -- DHCP is an IP (UDP, in fact) protocol. It
just has very special requirements (such as being able to use
src=0.0.0.0 dst=255.255.255.255) that aren't needed in normal operation,
so rather than slowing down the in-kernel IP stack it synthesizes raw
packets.
-hpa
next prev parent reply other threads:[~2009-10-12 22:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-12 21:50 DHCP and iptables lkml
2009-10-12 22:08 ` Arnd Bergmann
2009-10-12 22:41 ` lkml
2009-10-12 22:45 ` H. Peter Anvin [this message]
2009-10-12 22:53 ` lkml
2009-10-12 23:45 ` H. Peter Anvin
2009-10-12 23:59 ` Mathias Kub
-- strict thread matches above, loose matches on Subject: below --
2009-10-12 17:04 Mathias Kub
2009-10-12 16:34 lkml
2009-10-12 16:48 ` Arnd Bergmann
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=4AD3B1A6.10508@zytor.com \
--to=hpa@zytor.com \
--cc=arndbergmann@googlemail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lkml@makubi.at \
/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.