Changes
→Granting container an access to TUN/TAP: replace hardcoding with a variable CTID
Allow your container to use the tun/tap device by running the following commands on the host node:
vzctl set 101 $CTID --devices c:10:200devnodes net/tun:rw --save
vzctl set 101 $CTID --capability net_admindevices c:on 10:200:rw --save
vzctl exec 101 mkdir set $CTID -p /dev/net-capability net_admin:on --save
vzctl exec 101 $CTID mkdir -p /dev/net vzctl exec $CTID chmod 600 /dev/net/tun
== Configuring VPN inside container ==