Getting Started with QEMU (2018)
drewdevault.com
drewdevault.com
Eg, in his example:
... -nic user,model=virtio -drive file=alpine.qcow2,media=disk,if=virtio ...
I just found this, which looks like it has some promising recipes for doing that:
https://fadeevab.com/how-to-setup-qemu-output-to-console-and...
What's the problem with Virtualbox? Never had any problems with it, works perfectly. Please don't say Oracle = bad, that's not an answer
[1] https://www.phoronix.com/scan.php?page=news_item&px=OTk5Mw
For example, I run a closed source software (with both linux and windows versions) made by company A, which I use for doing business with company B. I'm happy for it to connect to company B's servers but I don't like it to phone home to company A (or any other 3rd parties)
Is it possible to run it in QEMU (or "bubblewrap"), allowing access to the public internet for a number of whitelisted websites (e.g. company B), and no access to my local lan?
It would be nice if it can be done with something like these
For the app I mentioned above:
qemu -net whitelist=www.companyB.com,blacklist=127.0.0.0/8 -drive file=app1.img
(or bubblewrap -net whitelist=www.companyB.com,blacklist=127.0.0.0/8 /usr/bin/app1)
For some other similar apps I could run: qemu -net whitelist=www.companyX.com;www.companyY.com,blacklist=127.0.0.0/8 -drive file=app2.img
I'm not keen to manage a bunch of iptables or vnet rules/configs on my host because the configs seem to be all over the places and not easy to get right. Also it takes too much time/work if I just want to spin up some random softeware and test quickly.Any insight and good ideas?
libvirt has per-domain firewalling but probably not with automatic DNS resolution.
if you have a router with VLAN support (Mikrotik, Ubiquiti, OpenWrt, many others), use VLANs. Isolate your VMs in their own subnet and configure your router what is allowed or not allowed for hosts in that subnet.
Alternatively, you can have a look how Proxmox does it. Proxmox uses qemu for VMs, iptables for firewall and their own cluster solution (corosync) to distribute the config (if you happen to have cluster) to all nodes. They are capable of isolating VMs connected to the same bridge.
Yep true. I don't have a homelab, only a signle computer. I run random applications and games from time to time, so to me convenience is something I can quickly set up and discard.