Skip to content

Setting Up Multiple Virtual Machines with Skywire VPN

Asgaror edited this page Oct 22, 2019 · 2 revisions

skywire logo

Setting Up Multiple Virtual Machines with Skywire VPN

Introduction

The following guide was initially created by Alex (@alexskyfleet) and details the procedure of setting up multiple virtual machines (VM) to run Skywire nodes to make use of the Skywire VPN service. This type of setup is particularly important for an operation that requires coordinated internet use that cannot be traced back to a single source. So far, the procedure was tested using a Raspberry Pi 2 Model B running a manager node and virtual Xubuntu machines running individual skywire nodes. The virtual Xubuntu machines are running on top of Windows 7 and the Skywire VPN is configured to run through Mozilla Firefox.

Requirements

The following software is required:

Setting Up the Virtual Machines

  1. Launch VMware Workstation 14.

  2. Create a new virtual machine and specify to “install the operating system later.”

    alt text

  3. Specify the operating system as follows:

    alt text

  4. In the following menu, specify the disk capacity as 20 GB.

  5. Once the VM is created, go to settings and specify the parameters as follows. To keep the installation process smooth make sure the RAM memory is 2048 MB (the RAM will be limited to 512 MB post-installation). Choose the Network Connection as “Bridged” and select the Xubuntu ISO as the “ISO image file” under CD/DVD:

    alt text

    alt text

  6. Navigate to C:\Program Files (x86)\VMware\VMware Workstation and launch vmnetcfg.exe to pull up the Virtual Network Editor of the VMware software.

  7. Select “Change Settings” to change and view VMnet0 subnet.

  8. Manually bridge the virtual machine adapter to the main connection of the host system.

    alt text

  9. Once the VM is configured, launch the virtual machine and follow the procedure to install Xubuntu.

  10. Once Xubuntu is installed, setup its static IP address as follows:

    • Go to Network Connections in the upper right hand corner.

    • Edit the connection “Wired Connection 1”

    • Go to IPv4 Settings and edit as follows (make sure the IP address is configured uniquely to each VM). Save the settings reboot the VM with sudo reboot:

    alt text

  11. To access the VM remotely, run the following commands to enable SSH service:

    sudo apt-get install openssh-server

    sudo service ssh start

Configuring Skywire VPN in the Virtual Machines

  1. Follow the following guide on installing Go and Skywire in the VM. It may be easier to SSH into the VM from the host machine using MobaXterm or PuTTY so that code can be copy-pasted and executed immediately, rather than typed out manually. If there is no manager running, then launch a manager node in one of the virtual machines. Make sure to have the nodes automatically run at startup.

  2. If the node does not run at startup, launch the Skywire node using the following command. The manager node is using IP address 192.168.0.101:

    cd $GOPATH/bin nohup ./node -connect-manager -manager-address 192.168.0.101:5998 -manager-web 192.168.0.101:8000 -discovery-address testnet.skywire.skycoin.com:5999-028ec969bdeb92a1991bb19c948645ac8150468a6919113061899051409de3f243 -address :5000 -web-port :6001 > /dev/null 2>&1 &

  3. The node should now be launched. Go to the Skywire Manager in a web browser 192.168.0.101:8000 and connect the new node to another node to configure the VPN.

  4. In the VM open the Web Browser (should be Mozilla Firefox by default) and go to Settings -> Preferences -> General -> Network Settings -> Settings.

  5. Input the following configuration. Make sure the SOCKS host is the IP address of the Skywire node running in the VM.

    alt text

  6. Exit the VM and now configure the VM to use 512 MB RAM and optionally link up a shared folder in the “Options” tab for easy file sharing between the host.

  7. Clone the Xubuntu VM as many times necessary and log into each one to assign a different IP address for each VM. It is recommended to use the following IPs:

    • Manager: 192.168.0.101
    • VM 1: 192.168.0.102
    • VM 2: 192.168.0.103
    • VM 3: 192.168.0.104
    • VM 4: 192.168.0.105

    If there is no manager node running, then change the IP address of VM 1 to 192.168.0.101 and run a manager node using the following commands:

    cd $GOPATH/bin nohup ./manager -web-dir ${GOPATH}/src/github.com/SkycoinProject/skywire/static/skywire-manager > /dev/null 2>&1 &sleep 3

  8. Furthermore in each cloned Xubuntu VM run the following commands to generate a new key for each Skywire node.

    cd /home/(USERNAME)/.skywire

    rm -r node

    sudo reboot

    Once the VM reboots and the skywire node application is executed, the node will have a new private key and it will show up in the Skywire Manager. If the node does not execute on startup, refer to step 2.

Afterword

Xubuntu is Linux based and open source, but if multiple VMs are being run on top of host machine that has minimal computational power and memory, Windows XP is a better performing OS for simple web browsing. During configuration of Skywire, keep in mind that the gateway host had the IP address 192.168.0.1. Different routers may have different IP addresses and the address may be a variation of 192.168.X.XXX. It also may be the case that an IP address is already taken when trying to configure a Skywire node. Make sure to ping the address before using it to make sure it is not being used.

Clone this wiki locally