Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Pascal Hambourg <pascal@plouf.fr.eu.org>
To: Jamie Cockburn <jcockburn@bloxx.com>
Cc: "netfilter@vger.kernel.org" <netfilter@vger.kernel.org>
Subject: Re: Iptables: Matching packets leaving a bridged interface
Date: Wed, 25 Jun 2014 13:03:13 +0200	[thread overview]
Message-ID: <53AAAC71.5000702@plouf.fr.eu.org> (raw)
In-Reply-To: <D1310F2F383A5D4D8D7944C4FB42CFA84CA24A@BLX-EX01.alba.local>

Jamie Cockburn a écrit :
> 
> Couple of follow-up question then!

All the answers (and much more) are in the ebtables manpage.

> 1: Do you know if by the time it reaches ebtables -> filter -> output that the packet will have a PHYSOUT (or equivalent) set?

Yes. See man ebtables, -o.

> 2: Will I be able to differentiate between packets for eth0 and eth1 (when the bridge doesn't know which specific interface it should send it on).

Yes. The bridge knows where it sends packets.

> 3: I'm guessing that by the time the packet hits ebtables -> filter -> output, that it will have lost its IN/PHYSIN?

Yes. See man ebtables, -i.

> 4: If that is the case, would something like this work:
>       - In iptables -> filter: -A FORWARD -i eth2 -o br0 -j MARK --set-mark 1234
>       - In ebtable -> filter: -A OUTPUT -physdev-out eth0 --m mark --mark 1234 -j DROP

Yes. See man ebtables, mark.

  reply	other threads:[~2014-06-25 11:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-25  8:03 Iptables: Matching packets leaving a bridged interface Jamie Cockburn
2014-06-25  9:57 ` Pascal Hambourg
2014-06-25 10:49   ` Jamie Cockburn
2014-06-25 11:03     ` Pascal Hambourg [this message]
2014-06-26  8:27       ` Jamie Cockburn

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=53AAAC71.5000702@plouf.fr.eu.org \
    --to=pascal@plouf.fr.eu.org \
    --cc=jcockburn@bloxx.com \
    --cc=netfilter@vger.kernel.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