From: Vigneswaran R <vignesh@atc.tcs.com>
To: Steve Hill <steve@opendium.com>
Cc: Jan Engelhardt <jengelh@medozas.de>, netfilter@vger.kernel.org
Subject: Re: Filtering on bridges
Date: Fri, 23 Dec 2011 10:03:29 +0530 [thread overview]
Message-ID: <4EF40499.3020005@atc.tcs.com> (raw)
In-Reply-To: <alpine.LNX.2.01.1112222302410.28561@frira.zrqbmnf.qr>
On Friday 23 December 2011 03:35 AM, Jan Engelhardt wrote:
>
> On Thursday 2011-12-22 18:36, Steve Hill wrote:
>
>> 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
Sorry for interrupting your discussion. I am following this thread from
the beginning. However, I couldn't get exactly how your setup looks
like. If possible, could you please give a simple (ascii) pictorial
representation of your setup. This may help more people (normal iptable
users like me) to understand the discussion better. Thank you.
Regards,
Vignesh
>
> What I mean is that with the mark, you record whether this is a
> potential candidate for dropping. E.g. if
>
> tcp 22 eth0 -> drop, tcp 22 eth1 -> accept
>
> you could
>
> -A OUTPUT -o br0 -p tcp --dport 22 -j MARK --set-mark [ssh-candidate-bit]
> ebtables -m mark --mark ssh-candidate-bit/ssh-candidate-bit -o [eth0/eth1] -j [DROP/ACCEPT]...
next prev parent reply other threads:[~2011-12-23 4:33 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
2011-12-22 22:05 ` Jan Engelhardt
2011-12-23 4:33 ` Vigneswaran R [this message]
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=4EF40499.3020005@atc.tcs.com \
--to=vignesh@atc.tcs.com \
--cc=jengelh@medozas.de \
--cc=netfilter@vger.kernel.org \
--cc=steve@opendium.com \
/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.