Tutorials/CloudSim/vpn connection

Connecting to a cloud simulation with a Virtual Private Network === This tutorial covers:
 * Connect your local computer to a cloud constellation using a Virtual Private Network

Prerequisites === This tutorial assumes you have launched a constellation.

On the local machine (the OCU), the openvpn package must be installed. sudo apt-get install openvpn

Introduction ===

Connection between a local computer to a cloud constellation is done using a Virtual Private Network. The local machine acts as an OpenVPN client (with ip address 11.8.0.2) that connects to the router that acts as server running inside the constellation (at ip address 11.8.0.1).

Machines in the constellation also have ip addresses in the 10.0.0.5x range, and those become visible once the VPN connection is established.

Setup the private network. ===

This section assumes that you are running a VRC constellation as explained in the Launch/terminate constellations in the cloud tutorial. Make sure the Configuration is VRC (Virtual Robotics Challenge) or VRC-stable (Virtual Robotics Challenge).

Download the router's zip file (by pressing the "Download keys" button from the router section of the CloudSim) and start the VPN.


 * 1) Do not forget to use your own constellation ID which you can find in your console

mkdir vpn_tutorial cd vpn_tutorial unzip ~/Downloads/router_cxe488142c.zip cd router_cxe488142c sudo ./start_vpn.bash

You should see an output similar to this: Killing other openvpn connections... tun0     Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 POINTOPOINT NOARP MULTICAST MTU:1500  Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

Adding route to 10.0.0.0/24 network VPN ready. To kill it: sudo killall openvpn

If, instead, you see a "Device not found" message, check that openvpn is working. There can only be a single VPN connection to the router at any time, so if your connection may be dropped if a VPN connection is made from a second machine.

This command starts an encrypted network connection between your local machine and the simulation constellation. To verify that it is the case, ping the field computer and the simulator:

ping 11.8.0.1
 * 1) ping the router using the vpn ip

ping 10.0.0.50
 * 1) ping the router using the private ip

ping 10.0.0.51
 * 1) ping the simulator

ping 10.0.0.52
 * 1) ping the field computer (if present)

Stopping the Virtual Private Network ===

You can stop the VPN connection at any time with the following command:

sudo killall openvpn


 * 1) Next ##


 * Connect to the machines inside the constellation