Jump to content
Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
NickTheGreek

How to enable TUN TAP in OpenVZ Container

Recommended Posts

vpn.jpg

 

This post explains how to enable TUN TAP in OpenVZ Container. TUN/TAP provides packet reception and transmission for user space programs. TUN and TAP are virtual network kernel devices. TUN (network TUNnel) is a network layer device and TAP (network TAP) is a link layer device. TUN is used with routing and the TAP is used for creating a network bridge, so TUN/TAP kernel module needs to be enabled in VPS for VPN configuration.

Enable TUN TAP in OpenVZ

The below steps explains how to enable TUN TAP in OpenVZ / Virtuozzo container:

First of all, you need to check the TUN module is loaded on the node.

 
lsmod | grep tun

If the above command shows a blank output, the TUN module is not loaded on the node, so we can enable it using the following command.

 
modprobe tun
chmod a+rx /etc/rc.modules

Check again:

 
# lsmod | grep tun
tun   19157   0

Then, enable TUN TAP in OpenVZ / Virtuozzo Container:

 
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

 

That’s it!!

https://grepitout.com/how-to-enable-tun-tap-in-openvz-container/

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×