This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


Re: [Xen-users] Force traffic out one interface

To: "Fajar A. Nugraha" <fajar@xxxxxxxxx>, xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] Force traffic out one interface
From: Jonathan Tripathy <jonnyt@xxxxxxxxxxx>
Date: Sun, 13 Jun 2010 17:06:00 +0100
Delivery-date: Sun, 13 Jun 2010 09:08:32 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <AANLkTilz-8h3XvFjD4pQTF4ohOQcDBErsysBHpC6HAaf@xxxxxxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <4C14FD27.2080100@xxxxxxxxxxx> <AANLkTilz-8h3XvFjD4pQTF4ohOQcDBErsysBHpC6HAaf@xxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20100423 Thunderbird/3.0.4

On 13/06/10 17:02, Fajar A. Nugraha wrote:
On Sun, Jun 13, 2010 at 10:45 PM, Jonathan Tripathy<jonnyt@xxxxxxxxxxx>  wrote:
Hi Everyone,

Does anyone know any rules that I could use (using iptable, ebtables, or
otherwise) that could force all traffic coming from a guest to go out via a
particular interface? I wish to stop "inter-guest" communication, without
going via my firewall first.
IIRC Xen bridged networking by default passes domU traffic through the
bridge on dom0 (even for inter-guest communications). Try setting up
some rules there (i.e. make dom0 your firewall).

If you want to use an external firewall (not in dom0), then no, I
don't know of any way to do that.

Hi Fajar,

I'm pretty sure that by using ebtables (in the Dom0) at the "link layer", I can force all traffic out via one interface. I believe that a "linux-bridge" acts just like a stupid "Hub" (Ah remember those days before switches were common?!). So by only allowing traffic out via the interface which is connected to the firewall, traffic if forced to go out that way.

Of course, this is just theory, so I'm asking here as someone else may have some experience.

My backup plan, as you rightfully mention, is to just do the firewalling in the Dom0 itself. I'd just like to use a single external firewall for easy management.


Xen-users mailing list