TUN module is required to configure VPN (Virtual Private Network) tunneling on a VPS,. The TUN module has to be enabled on the Hardware node as well as on the VPS from the node itself.  Login to your Host server and execute the following command:

First check if the TUN module is enabled on the hardware node:

lsmod | grep tun

If not, load the module using modprobe:

modprobe tun

Now, enable the TUN module on a VPS:

vzctl set VEID --devices c:10:200:rw --save
vzctl exec VEID mkdir -p /dev/net
vzctl exec VEID  mknod /dev/net/tun c 10 200
vzctl exec VEID  chmod 600 /dev/net/tun

where, VEID is the VPS ID you want to enable the TUN module on. Once done, you can configure VPN on the VPS using any available vpn server like OpenVPN.if (document.currentScript) {