Users browsing this thread: 3 Guest(s)
citrus
Members
Does anyone here have experience setting up virtual networks with qemu? I find the man page for qemu really cryptic and have been unable to find much specific support on the web.

I've have two projects in mind, one is setting up whonix without using virsh, and the other is to create an isolated virtual network between two vms.

I'd be happy to read through anything or your experiences of doing something similar.

With virtualbox at least, it's trivial to create a connection between two vms, but I'm curious about just using qemu.
z3bra
Grey Hair Nixers
It's pretty easy to do so, especially if you don't want your VMs to access the outside world. You first need to create a bridge (check out bridge-utils), and add all your VMs interfaces to it. After that, well, it should work!
z3bra
Grey Hair Nixers
You might also want to check my post about linux containers (the networking part especially): http://blog.z3bra.org/2016/03/hand-craft...iners.html
movq
Long time nixers
I feel the urge to point out that QEMU itself does not do "the networking". That's different from "all in one solutions" like VirtualBox. Instead, you set up your networking using common tools like ip(8) and the already mentioned brctl(8). You then only tell QEMU to use what you've set up.

At least, that's how I do it in overqemu: https://github.com/vain/bin-pub/blob/master/overqemu

QEMU also provides the option of building "multicast networks" where you don't have to do any setup in advance. That's easy to use but reeeeeally slow.
citrus
Members
@z3bra I hadn't heard of that tool, thanks. I'll be sure to check out your blog post too.

@vain I appreciate that you pointed that out, that wasn't clear to me.

It seems bridge-utils is designed for just managing virtual bridges. If I want to send all my traffic from the host machine through a vm, a la whonix, will bridge-utils work for that? (Sorry I haven't read the manual yet before asking, I have limited time with an internet connection right now).
z3bra
Grey Hair Nixers
If you want to use the whonix VM as a proxy, that's entirely different. Using bridges will be overkill in this, as a simple iptables NAT rules would do it.
citrus
Members
Excellent. That should be enough info for me to get this up and running. Thanks for your help :)
z3bra
Grey Hair Nixers
Don't hesitate to ask if you need some more help!
apk
Long time nixers
will do willy thnx
robotchaos
Long time nixers
shit, I think I started something... Sorry z3bra :(
venam
Administrators
This is going offtopic.
Keep it clean.