From: "raghunathan srinivasan" Subject: Re: Help with monitoring outgoing network traffic Date: Wed, 24 Oct 2007 13:34:35 -0700 Message-ID: References: <1193187567.32093.37.camel@thinkpad.localdomain> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0458602265==" Return-path: In-Reply-To: <1193187567.32093.37.camel@thinkpad.localdomain> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Mime-version: 1.0 Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Xen Developers List-Id: xen-devel@lists.xenproject.org --===============0458602265== Content-Type: multipart/alternative; boundary="----=_Part_8971_517615.1193258075556" ------=_Part_8971_517615.1193258075556 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi, thanks for the reply. Actually what I am trying to do is like a firewall yes. I understand that a Linux OS already provides it. I am trying to address a threat model where the host OS can be compromised by rootkits and viruses. And the VMM is not uncompromisable. Basically i want to incorporat= e basic packet filtering ability inside the VMM. So that even if a rootkit tires to open a backend to a remote machine - so its not really facebook that I am worried about. It cannot do it because the VMM traps that call. Can someone please help me out on this? thanks Raghu On 10/23/07, Daniel Stodden wrote: > > > On Tue, 2007-10-23 at 17:03 -0700, raghunathan srinivasan wrote: > > > I saw a folder called drivers\xen\netfront. > > I guess it interacts with the backend driver. Do I make changes in it? > > the answers are "yes, ", and "NO." > > without the intend to kill all the joy in your venture: what you're > looking for is a customary firewall. with xen, i'd suggest to use linux > to do it. no coding required (except, maybe, tricky stuff in the > facebook-specific aspect, that depends). just grep the web for iptables. > > the reason is because xen is not much about networking, as it's not > really about specific classes of devices, including network interfaces. > the VMM itself, as is all xen-specific things inside a linux guest, is > rather about raw resources: cpus, memory, interrupts, and only *very* > basic support in the area of domain intercommunciation. > > your network interface is driven by dom0, the initial VM you find in on > the screen once you've booted your system. that is basically a linux > kernel with all the features, including a fairly comprehensive > firewalling solution, which does logging and filtering and part of it > even delegated to userland if you want to code custom tricks in a sane > fashion. > > dom0 typically drives your network card. that's (typically) the eth0 > device you see in your network setup. all traffic, including any > additional nonprivileged domain, passes dom0. > > any other domain X gets a 'netfront' interface ethY, which is > conceptually connected to a 'netback' device vifX.Y via what you may > think of, in network lingo, as a virtual crossover cable: > > dom0: eth0 <-- bridging/nat --> vif1.0 <--- x ---> domU: eth0 > > the trick is to get the firewall to filter packets as they pass from > eth0 to vifX.Y to the ethY inside the domain you want to restrict -- and > vice versa. > you'll maybe need to learn a little about topics like NAT and/or 802.1d > bridging, depending on your preferred network setup. then check out > network filtering on linux. > > neither is a thing to learn about on xen-devel. for the xen-specific > parts of the equation above, i'd suggest to turn to the xen-users list, > as it hosts more people who are dealing with such issues on a regular > basis. > > regards, > daniel > > -- > Daniel Stodden > LRR - Lehrstuhl f=FCr Rechnertechnik und Rechnerorganisation > Institut f=FCr Informatik der TU M=FCnchen D-85748 Garching > http://www.lrr.in.tum.de/~stodden mailto:stodden@cs.tum.edu > PGP Fingerprint: F5A4 1575 4C56 E26A 0B33 3D80 457E 82AE B0D8 735B > > > --=20 http://www.public.asu.edu/~rsriniv8/ ------=_Part_8971_517615.1193258075556 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi,

thanks for the reply. Actually what I am trying to do is like a = firewall yes. I understand that a Linux OS already provides it. I am trying= to address a threat model where the host OS can be compromised by rootkits= and viruses. And the VMM is not uncompromisable. Basically i want to incor= porate basic packet filtering ability inside the VMM. So that even if a roo= tkit tires to open a backend to a remote machine - so its not really facebo= ok that I am worried about. It cannot do it because the VMM traps that call= .=20

Can someone please help me out on this?

thanks

Raghu=

On 10/23/07, Daniel Stodden <stodd= en@cs.tum.edu > wrote:

On Tue, 2007-10-23 at 17:03 -0700, raghunathan srinivasan wrote:
> I saw a folder called drivers\xen\netfront.
> I guess it int= eracts with the backend driver. Do I make changes in it?

the answers= are "yes, ", and "NO."

without the intend to ki= ll all the joy in your venture: what you're
looking for is a customary firewall. with xen, i'd suggest to use l= inux
to do it. no coding required (except, maybe, tricky stuff in thefacebook-specific aspect, that depends). just grep the web for iptables.

the reason is because xen is not much about networking, as it's= not
really about specific classes of devices, including network interfa= ces.
the VMM itself, as is all xen-specific things inside a linux guest,= is
rather about raw resources: cpus, memory, interrupts, and only *very*basic support in the area of domain intercommunciation.

your netwo= rk interface is driven by dom0, the initial VM you find in on
the screen= once you've booted your system. that is basically a linux
kernel with all the features, including a fairly comprehensive
firew= alling solution, which does logging and filtering and part of it
even de= legated to userland if you want to code custom tricks in a sane
fashion.

dom0 typically drives your network card. that's (typically) the= eth0
device you see in your network setup. all traffic, including anyadditional nonprivileged domain, passes dom0.

any other domain X g= ets a 'netfront' interface ethY, which is
conceptually connected to a 'netback' device vifX.Y via what yo= u may
think of, in network lingo, as a virtual crossover cable:

&= nbsp;   dom0: eth0   <-- bridging/nat --> vi= f1.0 <--- x ---> domU: eth0

the trick is to get the firewall to filter packets as they pass fro= m
eth0 to vifX.Y to the ethY inside the domain you want to restrict -- a= nd
vice versa.
you'll maybe need to learn a little about topics l= ike NAT and/or=20 802.1d
bridging, depending on your preferred network setup. then check o= ut
network filtering on linux.

neither is a thing to learn about = on xen-devel. for the xen-specific
parts of the equation above, i'd = suggest to turn to the xen-users list,
as it hosts more people who are dealing with such issues on a regularbasis.

regards,
daniel

--
Daniel Stodden
LRR =     -      Lehrstuhl f=FCr Rec= hnertechnik und Rechnerorganisation
Institut f=FCr Informatik der TU M= =FCnchen           &= nbsp; D-85748 Garching
http://www.lrr.in.tum.de/= ~stodden         mailto:stodden@cs.tum.edu
PGP Fingerprint: F= 5A4 1575 4C56 E26A 0B33  3D80 457E 82AE B0D8 735B





--
http://www.public.asu.edu/~rsriniv8/<= /a> ------=_Part_8971_517615.1193258075556-- --===============0458602265== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============0458602265==--