Enable Tun/Tap

SSH into your LXC container.
You will have to add a few lines to the linux boot file so that it executes the tun/tap device on every boot.

Go to the /etc/rc.local file and add these lines of code before the @exit line.

if ! [ -c /dev/net/tun ]; then
mkdir -p /dev/net
mknod -m 666 /dev/net/tun c 10 200
fi


Now after a full reboot you should have a working tun/tap interface so you can install OpenVPN on your LXC Container.

Note:
To edit CentOS file you can use:

#vi  /etc/rc.local

When done editing in Vim, it is important to hit Esc key to exit the edit mode. And then save and exit with:

#:wq   (yes, the colon is included in the command)

  • 5 Users Found This Useful
Was this answer helpful?

Related Articles

Setup PPTP on CentOS 7

Install PPTP VPN Server on your CentOS 7 OS VPS This PPTP VPN server works with both Centos 7...

Setup WireGuard VPN Server and Client (KVM)

1. Install WireGuard on the VPN server   - Ubuntu ≥ 19.10 #sudo apt install wireguard...