Let say we want to send the AI data from the factory back to a PC in headquarter, there are few methods to do this. The simplest method is using some remote login software like Anydesk or Teamviewer to transfer the data but users need to do this manually and the format of data must be a file. The second method is users can subscribe to a cloud service like Google Cloud Platform (GCP) or Amazon Web Service (AWS), then use reverse SSH tunneling to transfer the data. But this method required the user to possess computer networking knowledge because the user need to set up the cloud service and configure the firewall of the cloud service to enable certain SSH ports. The third method is to use Virtual Private Network (VPN) to link these private subnets together. There is a lot of VPN service available e.g., OpenVPN, Hotspot Shield, NordVPN, etc. In this example, I will show you how to use the OpenVPN cloud that comes with an intuitive web interface to set up a VPN network for AI starter kit.
The free version of OpenVPN Cloud provides 3 connections which means you can link 3 different private subnets together or in other words 254×3=762 devices can communicate with each other. After you create an account on OpenVPN Cloud, click on the Networks tab, then click Create Network.
Select Remote Access since we want to connect the AI starter kit to OpenVPN Cloud.
Create a network name. The term “Connector” is referring to AI starter kit in this demo. Always choose the closest region to reduce latency.
Enter your private subnet. OpenVPN Cloud need this info to forward incoming packet to the correct destination. Private domain is optional.
Since the AI starter kit is Linux based with Ubuntu 18.04, we select Linux and Ubuntu 18.04.
Open a new terminal and then copy-paste the command and run. The first command is to download a shell script named ubuntu_18.04.sh. The second command is to change the file permission of the downloaded shell script so that we are able to execute it. The third command is to execute the shell script. The shell script will perform some port forwarding and configure firewall rules in the AI starter kit.
Copy the token to terminal.
Ignore the offline warning, later reboot AI starter kit will solve this issue.
Click Finish and reboot your AI starter kit. The AI starter kit will automatic join the OpenVPN network during startup.
To verify the OpenVPN connection, open a new terminal and type ifconfig. You will see the tun0 interface if the AI starter kit successfully connects to the OpenVPN cloud.