Home / Server side scripting / Linux / Check TUN/TAP module is enabled or not on VPS – Linux OpenVZ

Check TUN/TAP module is enabled or not on VPS – Linux OpenVZ

Hello all,
Do you have a Virtual Private Server (VPS)? If yes, you might have heard about a module called TUN/TAP. This module is required to run a VPN application on your server. As we all know a VPN adds privacy and security to networks wheather it’s private or public. Companies use it often to protect their data from intruders.

Anyway, if you are using a VPS, you might not be able to activate this TUN/TAP module by yourserlf, you might get help from the VPS provider as this has something to do from the node level. You can check for this module and see wheather it’s enabled on your server. The command line will help you for this.

As I told TUN/TAP kernel module to be enabled on the server (OpenVZ) for installing VPN softwares. The following command will help you to check if your container (VPS) has been allocated TUN permissions appropriately.
For this, please login to the server as root user and run the below command:

# cat /dev/net/tun

The result returned should be :

# cat: /dev/net/tun: File descriptor in bad state

The module has been enabled in your server successfully, otherwise please contact VPS provider and check for this, you may have an option to enable the same from the VPS management console sometimes.

If you get a ‘Permission Denied’ error or anything else, there is likely a problem with the TUN configuration for your container, contact the tech and rectify it.

That’s all guys, thank you! 🙂

Jishnu KS
Latest posts by Jishnu KS (see all)

Leave a Reply

Your email address will not be published. Required fields are marked *

Social Media Auto Publish Powered By : XYZScripts.com