TAP (as in network tap) simulates a link layer device and it operates with layer 2 packets such as Ethernet frames. TUN (as in network TUNnel) simulates a network layer device and it operates with layer 3 packets such as IP packets. TAP is used to create a network bridge, while TUN is used with routing. By default TUN / TAP will be disabled when a New VPS has been Created.

To Manually Turn on the TUN/TAP, you can login to the Solus VM Control Panel with the logins recieved in the Login Details Mail and you can enable it through SSH as follows:

OpenVZ supports VPN inside a container via kernel TUN/TAP module and device.

Step 1: Login to SSH with root password
Step 2: Run the following command to enable TUN/TAP module via SSH

- Check tun module has already loaded on the Node.
# lsmod | grep tun

Then to load the tun module
# modprobe tun

- Run the following command in node
# vzctl set CID –devnodes net/tun:rw –save
# vzctl set CID –devices c:10:200:rw –save
# vzctl stop CID
# vzctl set CID –capability net_admin:on –save
# vzctl start CID
# vzctl exec CID mkdir -p /dev/net
# vzctl exec CID chmod 600 /dev/net/tun

Note: you have to replace the CID with your VPS ID or container ID

- To check TUN/TAP is enabled or not on VPS(CID)
# cat /dev/net/tun

If the output is “File descriptor in bad state” it means that TUN/TAP is enabled.
If the output is “No such device” it means TUN/TAP is not enabled.

If you need any assistance from our support person, you can contact us at suppott@scopehosts.com and info@scopehosts.com , we would be happy to help you.
Was this answer helpful? 3 Users Found This Useful (18 Votes)