TAP/TUN is used by VPN clients to connect your server network to your local computer network. TAP/TUN operates in network layer 3 and does routing of the packets. On VPS server you have this virtual device which is represented by the file called /dev/net/tun. TUN stands for tunnel as it is the short form of tunnel. TAP stands for network tap. These two values are associated with each other. Most of the VPN software uses tunnel technology to create tunnel between server and client.
How to check TAP/TUN on VPS server
TAP/TUN devices are by default enabled on fully hardware virtualization servers. Virtualization platform like VMWare, KVM, Hyper V and Xen have TAP/TUN support enabled by default. To ensure that TAP/TUN is supported ensure that file /dev/net/tun is present on the server.
You can run below command to ensure the presence of that file on the server
Sample output should be
On dedicated or physical servers TAP/TUN functionality is provided by the kernel module. You can check if tun kernel module is enabled on the server or not using the command called lsmod
lsmod | grep tun
lsmod will list all the modules loaded in the kernel. You can check if tun kernel module is loaded on the server. If that module is not present on the server then you can run command
Once that kernel module is enabled you can again run lsmod | grep tun to confirm its availability