From: John Haxby <john.haxby@oracle.com>
To: netfilter@vger.kernel.org
Subject: ebtables problem with Xen bridges
Date: Fri, 16 May 2008 11:24:01 +0100 [thread overview]
Message-ID: <482D60C1.1010800@oracle.com> (raw)
I have a problem with ebtables.
I am trying to configure a Xen domU as a firewall and while I can do
this when the domU acting as firewall/proxy and the domU behind the
firewall/proxy are on the same machine I can't make it work when the
domU behind the firewall is on a different machine to the domU
firewall.
In other words: this works:
+-------------------------------------------------+
| +---------------+ +---------------+ |
| | domU | | firewall domU | |
| +---------------+ +---------------+ |
| dom0 |
+-------------------------------------------------+
*broute
:BROUTING ACCEPT
-A BROUTING -s <dom0-MAC> -j ACCEPT
-A BROUTING -d <dom0-MAC> -j ACCEPT
-A BROUTING -s <firewall-MAC> -j ACCEPT
-A BROUTING -d <firewall-MAC> -j ACCEPT
-A BROUTING -p IPv4 -j dnat --to-dst <firewall-MAC> --dnat-target ACCEPT
The idea here is that dom0 and the firewall/proxy have unfettered
access but any other domU will have its IP traffic diverted through
the firewall/proxy. This works beautifully: the firewall gets to say
what is allowed to and from the other domU's and also gets to
redirect some traffic in the manner of a transparent proxy.
The reason for doing it this way rather than the more conventional
routing is that the non-firwall domU believes that it is on the local
LAN (it has a normal local LAN IP address) and, indeed, limiting the
final BROUTING rule to only match certain traffic does indeed allow
some traffic to skip the firewall altogether.
The problem now comes when I want traffic from a domU in a different
dom0 to go through the firewall.
I believe that what I should so is to add these to the beginning of
the above rules and then have the same rules on both machines.
-A BROUTING -s <dom0'-MAC> -j ACCEPT
-A BROUTING -d <dom0'-MAC> -j ACCEPT
Both dom0 and dom0' will have unrestricted access through their
respective bridges and, as before domU running on dom0 will get its
traffic diverted through the firewall domU.
I thought that a domU running on dom0' would also get its traffic
diverted through the firewall as well, but this doesn't seem to be the
case: something somewhere is just discarding frames.
I'm sure that this is supposed to be possible, but I'm missing
something (probably obvious) or I've misunderstood something.
Is it possible? What should I be doing?
jch
reply other threads:[~2008-05-16 10:24 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=482D60C1.1010800@oracle.com \
--to=john.haxby@oracle.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