Enabling the TUN/TAP device on OpenVZ

Posted by / Jun 3, 2015 / Categories: VPN

If you are running on our OpenVZ platform and wish to use a VPN you will need to enable TUN/TAP on your container.

To enable, login to the control panel and select the virtual machine in question. On the network tab, change TUN/TAP to “On”.

Screenshot: enable TUN/TAP

You can test by connecting to your virtual machine and executing the following:

cat /dev/net/tun

If the output is:

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

then TUN/TAP is enabled correctly.

What is TUN/TAP?

In computer networking, TUN and TAP are virtual network kernel devices. Being network devices supported entirely in software, they differ from ordinary network devices which are backed up by hardware network adapters.

About the author
I'm George and I work in the BHost support team. I'm responsible for replying to customer support requests, as well as writing articles for our help center. If there's anything you'd like us to blog about, let us know by emailing support@BHost.net