WireGuard¶
If WireGuard is enabled in your selected Instance Template you can open a WireGuard tunnel between your local machine and your instance.
WireGuard Installation¶
Follow the instructions provided here.
Open a tunnel¶
Download wg-<id>.conf from the instance page, then:
sudo wg-quick up wg-<id>.conf
| Tunnel IPs: | |
|---|---|
| Your machine | 10.14.<n>.2 |
| Instance | 10.14.<n>.1 |
You can get these IPs from the config's Address field.
Connecting ROS 2 through the tunnel¶
In the instance:
unset ROS_LOCALHOST_ONLY
export ROS_STATIC_PEERS=10.14.<n>.2
ros2 daemon stop 2>/dev/null
echo $ROS_DOMAIN_ID # set this id on your machine
Your machine:
export ROS_DOMAIN_ID=<ROS_DOMAIN_ID>
export ROS_STATIC_PEERS=10.14.<n>.1
ros2 daemon stop 2>/dev/null