qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Disabling outgoing connectiong from within guest
@ 2008-06-18 21:41 Łukasz Taczuk
  2008-06-19  0:01 ` Paul Brook
  0 siblings, 1 reply; 5+ messages in thread
From: Łukasz Taczuk @ 2008-06-18 21:41 UTC (permalink / raw)
  To: qemu-devel

Hi!

I would like to create a sandboxed environment in which random users
would be able to roam freely using ssh.
However, I don't want to allow them to open outgoing connections just
as if the box was offline (even if the guest is compromised).
Basically I would like to have something like reversed user mode
network stack: you can log in to the guest, but once you're in, you
cannot connect to the host nor any other machine.

I tried using the -redir option but it works only when user mode is
enabled which clearly defeats the purpose.
Is there a simple way to do it?

Thanks in advance

-- 
Lukasz Taczuk

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] Disabling outgoing connectiong from within guest
  2008-06-18 21:41 [Qemu-devel] Disabling outgoing connectiong from within guest Łukasz Taczuk
@ 2008-06-19  0:01 ` Paul Brook
  2008-06-20 11:41   ` Johannes Schindelin
  0 siblings, 1 reply; 5+ messages in thread
From: Paul Brook @ 2008-06-19  0:01 UTC (permalink / raw)
  To: qemu-devel; +Cc: Łukasz Taczuk

On Wednesday 18 June 2008, Łukasz Taczuk wrote:
> Hi!
>
> I would like to create a sandboxed environment in which random users
> would be able to roam freely using ssh.
> However, I don't want to allow them to open outgoing connections just
> as if the box was offline (even if the guest is compromised).
> Basically I would like to have something like reversed user mode
> network stack: you can log in to the guest, but once you're in, you
> cannot connect to the host nor any other machine.

Your host OS firewall/packet filter should already be able to do this.
IMHO there's little or no point reimplementing this functionality in qemu.

Paul

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] Disabling outgoing connectiong from within guest
  2008-06-19  0:01 ` Paul Brook
@ 2008-06-20 11:41   ` Johannes Schindelin
  2008-06-20 13:13     ` Paul Brook
  0 siblings, 1 reply; 5+ messages in thread
From: Johannes Schindelin @ 2008-06-20 11:41 UTC (permalink / raw)
  To: Paul Brook; +Cc: qemu-devel, Łukasz Taczuk

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1187 bytes --]

Hi,

On Thu, 19 Jun 2008, Paul Brook wrote:

> On Wednesday 18 June 2008, Łukasz Taczuk wrote:
>
> > I would like to create a sandboxed environment in which random users 
> > would be able to roam freely using ssh. However, I don't want to allow 
> > them to open outgoing connections just as if the box was offline (even 
> > if the guest is compromised). Basically I would like to have something 
> > like reversed user mode network stack: you can log in to the guest, 
> > but once you're in, you cannot connect to the host nor any other 
> > machine.
> 
> Your host OS firewall/packet filter should already be able to do this. 
> IMHO there's little or no point reimplementing this functionality in 
> qemu.

Except that Lukasz wrote about users in the sandboxed environment, not all 
users of the _host_ machine.

So there is obviously a point in implementing this in QEmu, _especially_ 
when you use a proprietary guest OS which you cannot fully trust.

Lukasz: I have had the need myself, and have some crude code to do that.  
If you want to use it as a starting point, and want to develop it into 
something really usable, give me a shout and I send you my patch.

Ciao,
Dscho

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] Disabling outgoing connectiong from within guest
  2008-06-20 11:41   ` Johannes Schindelin
@ 2008-06-20 13:13     ` Paul Brook
  2008-06-20 13:23       ` Ben Taylor
  0 siblings, 1 reply; 5+ messages in thread
From: Paul Brook @ 2008-06-20 13:13 UTC (permalink / raw)
  To: qemu-devel; +Cc: Łukasz Taczuk

On Friday 20 June 2008, Johannes Schindelin wrote:
> Hi,
>
> On Thu, 19 Jun 2008, Paul Brook wrote:
> > On Wednesday 18 June 2008, Łukasz Taczuk wrote:
> > > I would like to create a sandboxed environment in which random users
> > > would be able to roam freely using ssh. However, I don't want to allow
> > > them to open outgoing connections just as if the box was offline (even
> > > if the guest is compromised). Basically I would like to have something
> > > like reversed user mode network stack: you can log in to the guest,
> > > but once you're in, you cannot connect to the host nor any other
> > > machine.
> >
> > Your host OS firewall/packet filter should already be able to do this.
> > IMHO there's little or no point reimplementing this functionality in
> > qemu.
>
> Except that Lukasz wrote about users in the sandboxed environment, not all
> users of the _host_ machine.

Right. That's why you want to do the firewalling/sandboxing on the host. If 
you don't trust your host OS you're already screwed.

Paul

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] Disabling outgoing connectiong from within guest
  2008-06-20 13:13     ` Paul Brook
@ 2008-06-20 13:23       ` Ben Taylor
  0 siblings, 0 replies; 5+ messages in thread
From: Ben Taylor @ 2008-06-20 13:23 UTC (permalink / raw)
  To: qemu-devel

On Fri, Jun 20, 2008 at 9:13 AM, Paul Brook <paul@codesourcery.com> wrote:
> On Friday 20 June 2008, Johannes Schindelin wrote:
>> Hi,
>>
>> On Thu, 19 Jun 2008, Paul Brook wrote:
>> > On Wednesday 18 June 2008, Łukasz Taczuk wrote:
>> > > I would like to create a sandboxed environment in which random users
>> > > would be able to roam freely using ssh. However, I don't want to allow
>> > > them to open outgoing connections just as if the box was offline (even
>> > > if the guest is compromised). Basically I would like to have something
>> > > like reversed user mode network stack: you can log in to the guest,
>> > > but once you're in, you cannot connect to the host nor any other
>> > > machine.
>> >
>> > Your host OS firewall/packet filter should already be able to do this.
>> > IMHO there's little or no point reimplementing this functionality in
>> > qemu.
>>
>> Except that Lukasz wrote about users in the sandboxed environment, not all
>> users of the _host_ machine.
>
> Right. That's why you want to do the firewalling/sandboxing on the host. If
> you don't trust your host OS you're already screwed.

So in this situation, you're going to have a filter on the tap
device, that does something like:

allow incoming to port 22 (he did say ssh)

assuming guest is DHCP'd
allow incoming to port 68 (DHCP)
allow outgoing to port 68 (DHCP)

maybe allow dns so
allow incoming to port 53 (DNS) from dns server
allow outgoing to port 53 (DNS) to dns server

deny everything else incoming or outgoing

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-06-20 13:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-18 21:41 [Qemu-devel] Disabling outgoing connectiong from within guest Łukasz Taczuk
2008-06-19  0:01 ` Paul Brook
2008-06-20 11:41   ` Johannes Schindelin
2008-06-20 13:13     ` Paul Brook
2008-06-20 13:23       ` Ben Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).