tailscale for remote connection
tailscale can be used to connect to the remote machines or robots via secure VPN connection. It supports following protocols and few more
- EtherNet/IP
- TCP/IP
- UDP
tailscale uses light weight variant of WireGuardยฎ
Getting Startedโ
Create a free account on the tailscale by visiting Getting Started page. After account setup completed, Application should be installed on the remote pc and on a pc to connect.
After install, login to the device by selecting login
from the tray icon.
How tailscale worksโ
tailscale runs one pc in the same network you want to connect to and uses that pc as an exit node. Then it routes all your traffic through that node & through the subnet you are using to connect to PLC, Motion controller, HMI or any other device.
For example Omron run their traffic through 192.168.250.0.0/24
subnet. That starts from 192.168.250.0
to 192.168.250.255
.
Exit Nodeโ
First we need to advertise the device as Exit Node
. To do that, Right click on the tailscale icon on the system tray and select Exit Node
and select Run Exit Node
. This pops up a prompt Are sure you want to run an Exit Node?
. Click on Yes
to allow the pc to run as an Exit Node.
This will be showed in the Admin Console
.
Subnetsโ
To be able to route the traffic, tailscale needs to know the subnet
it needs to route the traffic through.
To set the subnets, open powershell
and run the following.
tailscale up --advertise-routes=192.168.0.0/24,192.168.250.0/24 --reset
After above subnet icon should be available on the Console.
Make sure to replace the subnet with your required one. Add them after comma. If your plc IP is 192.168.123.1
set subnet as 192.168.123.0/24
.
Enable Exit Node & Subnetโ
Once Exit Node
and Subnets
are enabled, you need approve those from the Admin Console
.
Click on three dotted menu icon and select Edit Route Settings
.
Click on Approve all
under subnet settings and turn on Use as Exit Node
.
Preferencesโ
Select the settings in the preferences and click on yes
if prompted based on your preferences.
Connectingโ
Once the setup on the remote PC is done, Login to your PC and connect to the remote PC under Exit Node
.
Try pinging the controller
$ ping 192.168.250.1
Pinging 192.168.250.1 with 32 bytes of data:
Reply from 192.168.250.1: bytes=32 time=3ms TTL=255
Reply from 192.168.250.1: bytes=32 time=2ms TTL=255
Reply from 192.168.250.1: bytes=32 time=4ms TTL=255
Reply from 192.168.250.1: bytes=32 time=4ms TTL=255
Ping statistics for 192.168.250.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 2ms, Maximum = 4ms, Average = 3ms
If ping is successful, connection to the PLC
/HMI
/IPC
or any other device in the network.
Try connecting to the controller now and if the IDE has use VPN
option, Make sure to select it. It might help with pocket drops in slow or spotty network condition.