Make sure the module “tun” is loaded on the host.
vzctl exec 2000 mkdir -p /dev/net
vzctl exec 2000 mknod /dev/net/tun c 10 200
vzctl exec 2000chmod 600 /dev/net/tun
On the container test the device:
when Something is wrong:
cat /dev/net/tun
cat: /dev/net/tun: Permission denied
It’s right and ready to use:
cat /dev/net/tun
cat: /dev/net/tun: File descriptor in bad state
Advertisement