For installing TUN/TAP for a OpenVZ vps, you should first make sure that the module is enabled in the node.
For this you need to run the command bellow.
For this you need to run the command bellow.
# lsmod | grep tunIf the module is not installed, just install it by running
# modprobe tunNow to enable the module to the vps, run the following commands. Replace Veid with your vps id
# vzctl set Veid --devnodes net/tun:rw --save
# vzctl set Veid --devices c:10:200:rw --save
# vzctl stop Veid
# vzctl set Veid --capability net_admin:on --save
# vzctl start Veid
# vzctl exec Veid mkdir -p /dev/net
# vzctl exec Veid chmod 600 /dev/net/tunNow TUN/TAP is enabled for the vps. To check this get into the vps.
# vzctl enter VeidNow run the following command in the vps.
# cat /dev/net/tunThe result of the above command should be
cat: /dev/net/tun: File descriptor in bad state
No comments:
Post a Comment