From: Mark Fox <mark.fox@gmail.com>
To: netfilter@vger.kernel.org
Subject: Re: Implications of a permissive FORWARD chain
Date: Wed, 26 Feb 2014 15:42:35 +0000 (UTC) [thread overview]
Message-ID: <loom.20140226T163317-807@post.gmane.org> (raw)
In-Reply-To: 53092C70.1060204@plouf.fr.eu.org
Pascal Hambourg <pascal <at> plouf.fr.eu.org> writes:
> [...]
>
> This is of course wrong. The host does the job of passing packets to and
> from VMs, so it has to see the traffic.
Agreed. Certainly, that matches with what I'm experiencing.
> > My understanding was that a bridge was a layer 2 device and netfilter would
> > be completely out of the loop on traffic travelling across the bridge.
>
> Not if the kernel has BRIDGE_NETFILTER=y. Then the various
> net.bridge.bridge-nf-* sysctls control which kind of traffic is passed
> to conntrack, iptables, ip6tables or arptables. By default all is passed.
Yes. To be clear, I'm ecstatic that this capability exists. A little
surprised too, but happy that there is another place to do some firewalling
if needed.
>
> > So I
> > disabled all forwarding on the container host, but was surprised when that
> > cut the containers off.
>
> What do you mean exactly by "I disabled all forwarding" ?
> Setting net.ipv4.ip_forward=0 or net.ipv4.conf.*.forwarding=0 should
> have no effect on bridged traffic. However iptables' DROP or REJECT may
> have an effect on IPv4 bridged packets when
> net.bridge.bridge-nf-call-iptables=1.
I set the policy for forwarded traffic to DROP.
> > I don't get the impression that this is specific to containers.
>
> It is not. It is specific to Linux bridge.
Cool. That makes perfect sense.
> > There is documentation
> > saying that one should do a 'iptables -I FORWARD -m physdev
> > --physdev-is-bridged -j ACCEPT' to allow traffic between a host and any KVM
> > guests.
>
> It is simpler and more efficient to disable passing bridged IPv4 packets
> to iptables with net.bridge.bridge-nf-call-iptables=0.
Agreed. Since I (now) want to take advantage of the firewalling ability, I
won't be doing this here, but it is good to know it is possible.
Thanks for the discussion. It's been enlightening.
next prev parent reply other threads:[~2014-02-26 15:42 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-18 17:53 Implications of a permissive FORWARD chain Mark Fox
2014-02-18 19:29 ` Leonardo Rodrigues
2014-02-18 20:02 ` Mark Fox
2014-02-18 21:03 ` Amos Jeffries
2014-02-19 1:25 ` Mark Fox
2014-02-18 22:10 ` Neal Murphy
2014-02-19 2:34 ` Mark Fox
2014-02-19 2:52 ` Neal Murphy
2014-02-19 14:38 ` Mark Fox
2014-02-19 18:12 ` Neal Murphy
2014-02-22 23:02 ` Pascal Hambourg
2014-02-26 15:42 ` Mark Fox [this message]
2014-02-18 19:57 ` Ambroz Bizjak
2014-02-19 2:38 ` Mark Fox
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=loom.20140226T163317-807@post.gmane.org \
--to=mark.fox@gmail.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 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.