How to add IP-based devices to network?

Often you want to add an IoT device that speaks IPv4 to your VPN but you can not install VPN on this device. One example of such device is IP camera.

Staex offers dependent nodes feature that helps solve this problem. Currently this is Linux-only feature.

To connect a dependent node to one of your regular Staex nodes use the following command.

mcc generate-dependent-node-certificate x.x.x.x

Here x.x.x.x is IPv4 address of the dependent node. The command creates necessary configuration files under /etc/mcc/dependent-nodes directory.

To read the new configuration restart mcc.

systemctl restart mcc

Now you can verify that the dependent nodes appeared in the routing table.

mcc nodes

NODE_ID                                               ADDRESS             LAST_SEEN                     PARENT                                                TAGS
3zb3xe4gh757dnhdsyrzxxv6efvpgkzg82m08a8w88a5sf48w7x0  x.x.x.x                                           4cc9pkyvvj6accsnc3ac79wy7zstw25cra7ka596tc3a8sg7k5ag
4cc9pkyvvj6accsnc3ac79wy7zstw25cra7ka596tc3a8sg7k5ag  y.y.y.y:9376        2023-10-17T10:48:34.485+0200  kd2npmmtvp6p02v7yhgqjdpg58xs9v2sw19k2a8skz4vbdqq1f50
kd2npmmtvp6p02v7yhgqjdpg58xs9v2sw19k2a8skz4vbdqq1f50  y.y.y.y:9376        2023-10-17T10:48:34.485+0200

Here 3zb3xe4gh757dnhdsyrzxxv6efvpgkzg82m08a8w88a5sf48w7x0 is the node id of your dependent node. You can use this id with any command in place of DNS name from any other node in Staex network.

ping 3zb3xe4gh757dnhdsyrzxxv6efvpgkzg82m08a8w88a5sf48w7x0

See also