[quote=“marmarek, post:48, topic:512”]Hi!
If Whonix gateway IP address is hardcoded in too much places, you can just leave it as it is and use some NAT rules to hide it from Qubes infrastructure. Something like this:
- Workstation uses IP assigned by Qubes.
- Gateway uses IP assigned by Qubes, and has additional dummy interface (modprobe dummy) with IP 10.152.152.10
- Gateway: iptables -t nat -A PR-QBS-SERVICES -d 10.152.152.10 -j REDIRECT (PR-QBS-SERVICES is called from PREROUTING, specifically for this purpose)
This way whatever is sent to 10.152.152.10, it will be intercepted by the gateway.
The same approach is already used in Qubes for updates proxy - VM can send traffic to 10.137.255.254 and it will be intercepted by updates proxy, wherever it is. Details here: https://wiki.qubes-os.org/wiki/SoftwareUpdateVM#Technicaldetails
This wont be as simple for workstation IP, but I guess it is much less problematic to change its IP.
Also I’m thinking how to make installation process as simple as possible. Is it possible to take a clean wheezy installation, add some apt repo and just install some metapackage, which will pull all the required stuff? If yes, IMHO it is the way to go. If no, can you still separate scripts for building clean wheezy from whonix? This way review would be much easier and your work will be reusable for other templates. In fact the current situation is almost good (at least in linux-template-builder), the commit history just contains some mess around it - perhaps I should look at the final diff (origin/master…nrgaway/master), not each commit separately…
Regarding AppVM/StandaloneVM - I assume you need some configuration/data persistence. Using StandaloneVM is rather inconvenient - at least because of disk space, but also more VMs to update. The easiest way would be to store such files in /rw (/rw/config? /rw/whonix?) and simply place symlinks in original location pointing at those files. Then add some startup script which will initialize /rw on the first boot. Keep in mind that template’s private.img isn’t accessible for VMs, so files to initialize /rw should be stores somewhere else.
For example I have this in /rw/config/rc.local in my UsbVM (where bluetooth adapter is attached):
rm -rf /var/lib/bluetooth
ln -s /rw/config/var-lib-bluetooth /var/lib/bluetooth
[/quote]
In some of my more recent builds, I have already separated out Whonix from Wheezy installation. Whonix now get installed as a flavor, like fedora uses for minimum install templates. So linux-template-builder can now create a Jessie only, Wheezy only, Jessie+Whonix-gateway/workstation (untested), Wheezy+Whonix-gateway/workstation, or ability to add in any other custom template flavors since I added hooks for that.
The commit history is a mess since I had to try many different configurations to get things to work. I will build a clean commit history once everything is working.
I have not had much time this weekend to work on the IP challenges, but will take a look at your solution as well now. It seems very interesting.
The requirement of needing a standalone AppVM is only for testing purposes and will not be a requirement once I have this working. I still need to work on the ability to update the main template though and it MUST be updated via a tor / Whonix connection, not via clearnet.
One other thing I am working on is the ability to install Whonix using Salt-Stack’s salt-minion. This should allow Whonix to be installed on any Linux platform (using my custom formulas). I can complete this once I get everything else working.