Connecting to remote PLC/IPC with Tailscale
Have you ever tried to connect to support you client by connecting their machinery by remoting into their PC/Laptop with anydesk/Teamviewer
? It's always pain. You might have faced a few problems. Such as Low display quality, slow internet speed and required IDE such as TIA portal
, SoMachine
, DIAStudio
, Sysmac Studio
and others with licensing
issues.
Ewon Solved these issues by allowing you connect to the PLC with simple VPN but pricing is big factor. It's cheap. Not everyone can afford it. On top of that connection drops are big problem.
[Tailscale])(https://tailscale.com/) solves most of those issues by allowing you to simply connecting directly to your controller.
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
Getting Started
Create a free account on the tailscale by visiting Getting Started page. After account setup completed, You need to install application on the remote pc and your 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
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.