Skip to contentSkip to conversation

Interesting QEMU + OpenVPN

Qemu-devel Jonathan Kalbfeld 5 participants 5 messages Aug 1, 2006 – Sep 10, 2006

lore
Share & tools
lore
#0 lore raw

I have an instance of NetBSD 3.0.1 that runs inside of QEMU emulating an i386.

On the parent system, whether it is Windows, Linux, Solaris, or *BSD, you can run an OpenVPN instance and set up a tunnel.

On the guest system, you can then run OpenVPN and connect to the other end of the tunnel.

Voila! Now, from the parent system, you can connect directly to your QEMU instance by using the tunnel.

I set this up on my Sun Blade and am using it to test protocols. My next task will be setting up a Virtual Ethernet Bridge between an emulated i386 on QEMU here in LA and a real-live NetBSD brick at my parents' home in Detroit.

Interesting stuff!

jonathan

Signature · 3 lines
--
Jonathan Kalbfeld
+1 323 620 6682
#1 lore raw
Quoted 10 lines · Jonathan Kalbfeld

I have an instance of NetBSD 3.0.1 that runs inside of QEMU emulating an i386.

On the parent system, whether it is Windows, Linux, Solaris, or *BSD, you can run an OpenVPN instance and set up a tunnel.

On the guest system, you can then run OpenVPN and connect to the other end of the tunnel.

Voila! Now, from the parent system, you can connect directly to your QEMU instance by using the tunnel.

Maybe you like to add some details (something like a small "howto"?) and add a small description of this to QEMU Wiki [1]?

Dirk

[1] http://kidsquid.com/cgi-bin/moin.cgi

#2 lore raw
In reply to Jonathan Kalbfeld
Quoted 12 lines · Jonathan Kalbfeld

I have an instance of NetBSD 3.0.1 that runs inside of QEMU emulating an i386.

On the parent system, whether it is Windows, Linux, Solaris, or *BSD, you can run an OpenVPN instance and set up a tunnel.

On the guest system, you can then run OpenVPN and connect to the other end of the tunnel.

Voila! Now, from the parent system, you can connect directly to your QEMU instance by using the tunnel.

Quoted 8 lines

I set this up on my Sun Blade and am using it to test protocols. My next task will be setting up a Virtual Ethernet Bridge between an emulated i386 on QEMU here in LA and a real-live NetBSD brick at my parents' home in Detroit.

Interesting stuff!

jonathan

I have used OpenVPN in this scenario and it works exceptionally well, especially since you can bridge the adapters on the host and transparently connect the guest to your internal LAN. Maybe one day qemu will have builtin OpenVPN support so it won't have to be installed on the guest?

-Joseph

#3 lore raw
Quoted 4 lines

I have used OpenVPN in this scenario and it works exceptionally well, especially since you can bridge the adapters on the host and transparently connect the guest to your internal LAN. Maybe one day qemu will have builtin OpenVPN support so it won't have to be installed on the guest?

You can already bridge the host and gues using the existing networking options (and/or VDE - http://vde.sf.net), without the encryption overhead and without needing any special setup on the guest.

If you actually need the encryption then IMHO that's best left to dedicated packages like OpenVPN.

Paul

#4 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Paul" == Paul Brook <[email protected]> writes:

Paul> You can already bridge the host and gues using the existing Paul> networking options (and/or VDE - http://vde.sf.net), without the Paul> encryption overhead and without needing any special setup on the Paul> guest.

This is precisely what I do. When my host system starts up, it creates a bridge called "localnet" with only one card in it (my physical ethernet card). My /etc/qemu-ifup reads:

#! /bin/sh
sudo ifconfig $1 up
sudo brctl addif localnet $1

I run qemu with "-net nic -net tap" and that's it, the qemu instance has access to my local network, DHCP server, IPv6 routers, etc.

Sam

Signature · 1 line
Samuel Tardieu -- [email protected] -- http://www.rfc1149.net/