{{Header}} {{#seo: |description=Authenticated / Encrypted Connections between {{project_name_gateway_long}} and {{project_name_workstation_long}}, ARP spoofing defense, SSH, OpenVPN, Using additional (isolated) network interfaces. Remote {{project_name_gateway_long}}. |image=Binary-503583640.jpg }} {{Title|title= Connections between {{project_name_gateway_short}} and {{project_name_workstation_short}} }} [[File:Binary-503583640.jpg|thumb|200px]] {{intro| Authenticated / Encrypted Connections between {{project_name_gateway_short}} and {{project_name_workstation_short}}, ARP spoofing defense, SSH, OpenVPN, Using additional (isolated) network interfaces. Remote {{project_name_gateway_short}}. }} = Introduction = * This chapter does not apply to [[Qubes|{{q_project_name_long}}]]. Because by Qubes default, AppVMs behind the same ProxyVM [or NetVM] are prevented from connecting to each other. * This chapter applies to [[Non-Qubes-Whonix|{{non_q_project_name_short}}]] using [[Multiple Whonix-Workstation|Multiple {{project_name_workstation_short}}]]. * This chapter applies to [[Dev/Build_Documentation/Physical_Isolation|Physical Isolation]] (using [[Multiple Whonix-Workstation|Multiple {{project_name_workstation_short}}]]). * Remote {{project_name_gateway_short}}: If you want to connect to a {{project_name_gateway_short}} over insecure, untrusted, or unknown foreign networks (internet). * You should read it if using any custom, non-stock, configurations. Related: [[Ports|Opening ports in {{project_name_short}}]] == Essentials == By default, {{project_name_long}} assumes that {{project_name_gateway_short}} and {{project_name_workstation_short}} are connected by (virtual) LAN cable. Wireless technologies are not recommended as a malware compromised {{project_name_workstation_short}} could access (other) wireless access points and subsequently connect without Tor or find user's location based on WiFi SSIDs. Using a (virtual) cable enforces that {{project_name_workstation_short}} can only connect through {{project_name_gateway_short}}. For the same reason, connections to {{project_name_gateway_short}} over the internet are also not recommended. By default, connections between {{project_name_workstation_short}} and {{project_name_gateway_short}} are neither authenticated nor encrypted. The above (virtual) LAN connection between {{project_name_workstation_short}} and {{project_name_gateway_short}} is assumed to be secure. Here, secure is an assumption that nothing within your (virtual) LAN will MITM attack anything else. Adding authentication and/or encryption by default would further increase the complexity of {{project_name_short}}, which is to be avoided as explained in earlier chapters. If you want to run [[Multiple Whonix-Workstation|Multiple {{project_name_workstation_short}}]] at the same time inside the same (virtual) isolated LAN, authentication should be added: * Inside virtual LANs: ** Authentication is enough. ** Encryption is not required. (When machines cannot be impersonated, MITM attacks are not possible from within the virtual LAN.) * Inside physical LANs: ** If your threat model includes the possibility of a MITM attack, encryption is needed . If you want to connect to a {{project_name_gateway_short}} over insecure, untrusted, or unknown foreign networks (internet): * Both authentication and encryption should be added. ** Encryption is required to deny MITM eavesdropping. ** Authentication validates the identity of the connecting machine. *** Encryption solutions such as OpenVPN and ssh also provide authentication. == Motivation for secure {{project_name_gateway_short}} / {{project_name_workstation_short}} connections == '''Only applies to ''non-stock'' configurations''': If you run [[Multiple Whonix-Workstation|Multiple {{project_name_workstation_short}}]] simultaneously or want to connect to {{project_name_gateway_short}} over insecure or untrusted networks (internet): A compromised {{project_name_workstation_short}} can impersonate the {{project_name_gateway_short}}, or any other {{project_name_workstation_short}}, within the same (virtual) LAN, perform active MITM attacks, or passively eavesdrop. == OpenVPN vs SSH == Encryption can be added using OpenVPN or SSH. SSH, but not OpenVPN, has the advantage of being able to still easily tunnel a VPN through Tor, later. If you don't plan to do so, OpenVPN is probably easier. SSH has the disadvantage of increased setup complexity in this use case - you are probably better off using OpenVPN. = Authenticated connections between {{project_name_gateway_short}} and {{project_name_workstation_short}} = == ARP spoofing defense == This has only been quickly researched: From the [https://en.wikipedia.org/wiki/ARP_spoofing Wikipedia article about ARP spoofing], it appears that ''Static ARP entries'' could be used to authenticate connections between {{project_name_gateway_short}} and {{project_name_workstation_short}}. == Using additional (isolated) network interfaces == === Theoretical === ''(This chapter is actually not authentication, but solves the threat nonetheless.)'' A workaround, when running all vm's on the same VirtualBox host: * One can enable additional Virtual Network Adapters with uniquely named internal virtual networks, inherently isolating up to 7 {{project_name_workstation_short}} per {{project_name_gateway_short}}, "[https://www.virtualbox.org/manual/ch06.html Four of the network cards can be configured in the "Network" section of the settings dialog in the graphical user interface of VirtualBox. You can configure all eight network cards on the command line via VBoxManage modifyvm]" A workaround, for {{project_name_short}} with Physical Isolation, where ''all'' possible connecting machines are trusted: * {{project_name_gateway_short}} inherently requires two network interfaces - external and internal. Additional physical and/or virtual LAN interfaces could be added. ''(Ensure no bridging takes place.)'' === Instructions ===
port
element property isolated
, when set to yes
(default setting is no
) is used to isolate this interface's network traffic from that of other guest interfaces connected to the same network that also have
. This setting is only supported for emulated interface devices that use a standard tap device to connect to the network via a Linux host bridge. This property can be inherited from a libvirt network, so if all guests that will be connected to the network should be isolated, it is better to put the setting in the network configuration. (NB: this only prevents guests that have isolated='yes'
from communicating with each other; if there is a guest on the same bridge that doesn't have isolated='yes'
, even the isolated guests will be able to communicate with it.)
= Encrypted and authenticated connections between {{project_name_gateway_short}} and {{project_name_workstation_short}} = == Using SSH (not tested/recommended) == Each Gateway and Workstation should have its own SSH account and certificate distributed to each machine to which it will connect. Internet search How to set up ssh keys, for example, for instructions. Each Gateway and Workstations will need ssh installed and the service started. Workstations need to be configured to automatically reconnect - in case {{project_name_workstation_short}} starts before the Gateway, or restarts. Consider: autossh Workstations need to use the tunnel IP to connect to the Gateway. The {{project_name_gateway_short}} should only accept certificate authentication, and only forward or answer to Tor over the SSH tunnel. All Workstations must use the established SSH tunnel to the Gateway, redirect such network access to socks via tranSOCKS_ev or similar. The {{project_name_gateway_short}} firewall may need corresponding changes. Not impossible to use SSH for this - but intricate. Do not allow SSH logins! See: [https://serverfault.com/questions/56566/ssh-tunneling-only-access ssh login] You may be better off using OpenVPN. ''However - OpenVPN is a full machine to machine connection, while ssh is easily port restricted.'' == Using OpenVPN ==