Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Steve Hill <steve@opendium.com>
To: Jan Engelhardt <jengelh@medozas.de>
Cc: netfilter@vger.kernel.org
Subject: Re: Filtering on bridges
Date: Thu, 22 Dec 2011 17:36:26 +0000	[thread overview]
Message-ID: <4EF36A9A.3040803@opendium.com> (raw)
In-Reply-To: <alpine.LNX.2.01.1112221222570.3495@frira.zrqbmnf.qr>

On 22/12/11 16:28, Jan Engelhardt wrote:

>> So at the moment, the only way I can think of doing the filtering is to allow
>> the packet to run through *all* the iptables rules without matching the
>> physical output NIC and set one bit of the fwmark for each physical interface I
>> would let the packet egress.  Then in ebtables (where we know the physical
>> interface) filter the packets by looking at the fwmark bit that I've used to
>> indicate that interface. This method is pretty unscalable (fwmark is 32
>> bits)
>
> As for filtering, which I had gathered was what you wanted, you could
> set the fwmark to indicate drop-or-not-drop (rather than a bit for each
> interface).

Nope, can't do that - the iptables rules aren't going to know whether 
the packet needs to be dropped or not since it doesn't know which 
physical NIC it will egress - each NIC has its own (different) set of 
filtering rules, so without knowing the NIC, iptables won't know which 
set of filtering rules to apply and therefore whether the packet is to 
be dropped or not.

-- 

  - Steve Hill
    Technical Director
    Opendium Limited     http://www.opendium.com

Direct contacts:
    Instant messager: xmpp:steve@opendium.com
    Email:            steve@opendium.com
    Phone:            sip:steve@opendium.com

Sales / enquiries contacts:
    Email:            sales@opendium.com
    Phone:            +44-844-9791439 / sip:sales@opendium.com

Support contacts:
    Email:            support@opendium.com
    Phone:            +44-844-4844916 / sip:support@opendium.com

  reply	other threads:[~2011-12-22 17:36 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-21 10:16 Filtering on bridges Steve Hill
2011-12-21 13:30 ` Jan Engelhardt
2011-12-21 13:48   ` Steve Hill
2011-12-21 15:36     ` Niccolò Belli
2011-12-21 18:36     ` Jan Engelhardt
2011-12-21 23:21       ` Steve Hill
2011-12-21 23:31         ` Jan Engelhardt
2011-12-22 10:56           ` Steve Hill
2011-12-22 16:28             ` Jan Engelhardt
2011-12-22 17:36               ` Steve Hill [this message]
2011-12-22 22:05                 ` Jan Engelhardt
2011-12-23  4:33                   ` Vigneswaran R
2012-01-03 13:15                     ` Steve Hill
2012-01-03 16:09                       ` Jan Engelhardt
2012-01-03 18:43                       ` John A. Sullivan III

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=4EF36A9A.3040803@opendium.com \
    --to=steve@opendium.com \
    --cc=jengelh@medozas.de \
    --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