tun/tap in Synology DSM

This is already well explained in another blog, so I’m publishing this post both as a backup and as a personal reminder.

It seems that DSM 7.2.x doesn’t load by default the kernel module for TUN/TAP virtual devices; to fix this you need to enable SSH access on DSM, log in via SSH and run:

sudo insmod /lib/modules/tun.ko

Note that sudo should be configured to use your own user password. To make the change persistent, create the file /usr/local/etc/rc.d/tun.sh with the following contents:

#!/bin/sh
/sbin/insmod /lib/modules/tun.ko

Remember to make the file executable. Also note that while this step is also present in the linked blog post, I haven’t verified it yet myself.

The reason for needing TUN/TAP support will be explained in another post: Syncthing + Tailscale + Synology DSM.