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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×