Can I copy binary for "tun" kernel module onto IOT device and load it manually to run Tailscale?

My arm64 device is running embedded Linux.

Linux HOST 4.9.236+ #1 SMP PREEMPT Thu Feb 4 16:11:20 CST 2021 aarch64 GNU/Linux

When I try to launch tailscaled, it complains “module tun not found” … as expected.

./tailscaled --state=tailscaled.state

Program starting: v1.6.0-tddc975fcb-g995460c32, Go 1.16.2-ts3b83fb3: []string{"./tailscaled", “–state=tailscaled.state”}

is CONFIG_TUN enabled in your kernel? modprobe tun failed with: modprobe: module tun not found in modules.dep
CreateTUN: no such device

There is no “tun” module under /lib/modules.

My question is … Should it be possible for me to COPY a binary for the “tun” module onto this device and then manually load it into the kernel with modprobe?

I’m hoping someone else has already figured this out.

Any suggestions appreciated …

It’s unlikely that you will be able to easily get the right kernel module unless you have the source code for the kernel you are actually running. You may want to contact the people that made that device in order to get the right source tarball.

Alternatively you could try running Tailscale in userspace networking mode with ./tailscaled --tun=userspace-networking --state=tailscaled.state --socks5-server localhost:1080. That should let you get some level of connectivity, however you will need to configure applications to use a socks5 server to connect over Tailscale. This feature is still in beta, but it should be sufficient enough to allow you to get somewhere.