{{Header}} {{Title|title= Multiple {{project_name_gateway_long}} }} {{#seo: |description=Compartmentalization. Managing multiple {{project_name_gateway_short}}. |image=Multiplegateways131231.jpg }} {{multiple-vms-mininav}} [[image:Multiplegateways131231.jpg|thumb]] {{intro| Compartmentalization. Managing multiple {{project_name_gateway_short}}. }} = Introduction = {{mbox | type = notice | image = [[File:Ambox_notice.png|40px|alt=Info]] | text = '''Note''': It is far safer and easier to manage multiple {{project_name_gateway_short}} when only one is launched for user activities, rather than running many in parallel. }} Multiple [[Whonix-Gateway|{{project_name_gateway_short}}]] can be used alongside multiple [[Whonix-Workstation|{{project_name_workstation_long}}]], but this has both advantages and disadvantages. One security benefit is the isolation of separate {{project_name_gateway_short}} VM instances. In the event that one {{project_name_gateway_short}} is compromised, it is not certain the other(s) will be similarly compromised. On the downside, newly cloned {{project_name_gateway_short}}(s) will end up with a different set of Tor entry guards unless precautions are taken. Such as manually configuring identical [[Tor_Entry_Guards|Tor entry guards]]. Qube-{{project_name_long}} users can copy the Tor state folder to another instance or use [[Bridges]]. At present, full instructions are not available for every {{non_q_project_name_short}} platform. In this configuration ISPs are probably capable of detecting that two different Tor data folders are in use, but this is not necessarily an anonymity threat. Similarly, if multiple Tor Browsers are used with distinct {{project_name_gateway_short}}, then a different set of Tor entry guards will be used as well (unless by chance the same Tor guards are chosen for different {{project_name_gateway_short}}). When multiple {{project_name_gateway_short}} are run in parallel, the risks explained in the [[Multiple Whonix-Workstation#Safety_Precautions|Multiple {{project_name_workstation_short}}: Safety Precautions]] section equally apply. Platform specific. Select your virtualizer below. {{Tab |type=controller |linkid=link1 |content= {{Tab |title= = VirtualBox = |image=[[File:Virtualbox_logo.png|25px]] |addToClass=info-box |active=true |content= In VirtualBox Manager, it is necessary to change the name of the internal network for both {{project_name_gateway_short}} and {{project_name_workstation_short}}. '''1.''' Learn the default {{project_name_short}} internal network name. It is {{project_name_short}}. '''2.''' Pick an alternative internal network name. For the second, third or nth multiple {{project_name_gateway_short}} another internal network name is required. Any name can be used, but make sure it is not re-used in any other {{project_name_gateway_short}} which should be isolated from this one. The following example will use {{project_name_short}}'''2''', however it could be something completely different like for-my-onion-web-server. '''3.''' Change {{project_name_gateway_short}} internal network name. * VirtualBox → {{project_name_gateway_short}} → SettingsNetworkAdapter '''2'''Name: → change Whonix to something else such as {{project_name_short}}'''2'''OK '''4.''' Change {{project_name_workstation_short}} internal network name. * VirtualBox → {{project_name_workstation_short}} → SettingsNetworkAdapter '''1'''Name: → change Whonix to the same internal network name as above → OK }} {{Tab |title= = KVM = |image=[[File:Kvm-new-logo.png|25px]] |addToClass=info-box |content= In this configuration, {{project_name_workstation_short}} will not be able to communicate with one another. This is recommended to keep different Tor activity profiles completely separate. To run multiple {{project_name_gateway_short}} it is necessary to clone existing VMs; the steps below assume an existing {{project_name_short}} install. {{Box|text= '''1.''' Create clones of the Gateway and Workstation VMs rolled back to clean snapshots. In Virtual Machine Manager: Highlight VMOpenVirtual MachineClone...Clone '''2.''' Export {{project_name_short}} internal network settings.
sudo virsh net-dumpxml Whonix-Internal > Whonix-Internal2.xml
'''3.''' Edit the network configuration to make it unique. * Change the '''name''' and '''bridge name'''. * Delete the '''mac address''' and '''uuid''' parameters. Alternatively, replace the configuration with the example below (this assumes the only custom networks are {{project_name_short}}-related).

  Whonix-Internal2
  

Save and exit.
CTRL-X
y
CTRL-M
Note: * virbr1 is assigned to the Whonix-External network (default {{project_name_gateway_short}} external NAT NIC); and * virbr2 is assigned to the Whonix-Internal network (default {{project_name_workstation_short}} internal NIC). Therefore, the network name was changed to internal2 and the bridge name to virbr3. '''4.''' Import and start the new network.
virsh -c qemu:///system net-define Whonix-Internal2.xml
virsh -c qemu:///system net-autostart Whonix-Internal2
virsh -c qemu:///system net-start Whonix-Internal2
'''5.''' Attach the Gateway and Workstation VM NICs to the new network. Ensure that one Gateway NIC is attached to the external network. It is important to carefully match internal network interfaces to the new ones and not accidentally switch to a NIC that connects outside. To edit the VM virtual NIC settings:
Highlight VMOpenSettingsNIC virtual hardware → Set Network Source to: Virtual network 'Whonix-Internal2' : Isolated network, internal and host routing only Note that the network is exclusively internal and does not communicate with the host in any way. '''6.''' Change the number of pinned CPUs. It is recommended to [[KVM#Editing_an_Imported_Machine.27s_XML_Configuration|edit]] the cloned workstation's configuration and change the number of pinned CPUs to a different value (3 or 4) compared to the existing gateway and primary workstation. This only works if users have a quad-core system. }} }} {{Tab |title= = {{q_project_name_long}} = |image=[[File:Qubes-logo-icon.png|25px]] |addToClass=info-box |content= It is simple to create additional {{project_name_gateway_short}} ({{project_name_gateway_vm}} instances) in [[Qubes|{{q_project_name_short}}]]. Though the procedure is for advanced users who want the security benefit of separate {{project_name_gateway_short}} instances in {{q_project_name_short}}. While it affords some protection in the event that other {{project_name_gateway_short}} instances are compromised, it will result in a different set of Tor entry guards unless precautions are taken. Please ensure that the newly created {{project_name_gateway_vm}} is based on the {{project_name_gateway_template}} Template and has a distinctive VM name, so it is not confused with other VMs. Additionally, it is recommended not to run multiple {{project_name_gateway_short}} instances in parallel, see [[Multiple {{project_name_gateway_short}}#Introduction|Multiple {{project_name_gateway_short}}]]. To create a [[{{project_name_gateway_short}}|{{project_name_gateway_short}}]] ProxyVM in Qubes: # Qubes VM ManagerQubeCreate new qube # Name and label: Name the ProxyVM. Do not include any personal information; if the ProxyVM is compromised, the attacker could run qubesdb-read /name to reveal its name. Use a generic naming convention, for example: {{project_name_gateway_vm}}-2. # Color: Choose a color label for the {{project_name_gateway_short}} ProxyVM. # Type: Choose the type AppVM. # Template: Choose {{project_name_gateway_short}} Template. For example: {{project_name_gateway_template}}. # Networking: Choose the desired clearnet Service Qube from the list. For example: sys-firewall. # Advanced: Place a check mark in the "provides network" box. This will allow the {{project_name_gateway_short}} ProxyVM to provide networking for other App Qubes. # Press: OK. # See screenshots in footnotes if needed. '''Figure:''' ''Qubes Manager: Create New Qube - Step 1''
{{ContentImage| [[File:Createproxyvm.png]] }}
'''Figure:''' ''Qubes Manager: Create New Qube - Step 2''
{{ContentImage| [[File:Createproxyvm2.png]] }}
# Open a dom0 terminal. # Add qvm-tag anon-gateway to the newly created App Qube. [[Dev/Qubes#qvm-tags|Developer documentation about qvm-tags]] Note: Replace {{project_name_gateway_vm}}-2 with the actual name of the VM. {{CodeSelect|code= qvm-tags sys-whonix-2 add anon-gateway }} 12. Done. }} }} = See Also = {{multiple-vms-mininav}} * [[{{project_name_gateway_short}}|{{project_name_gateway_short}}]] = Footnotes = {{reflist|close=1}} {{Footer}} [[Category:Documentation]]