{{tag>lxc openvpn vpn}} ====== Install OpenVPN in lxc ====== On Debian 9 Stretch host create these files for Debian 7 Wheezy container mkdir /dev/net mknod /dev/net/tun c 10 200 Follow tutorial at https://web.archive.org/web/20220927084048/https://openvpn.net/community-resources/how-to/ apt-get install openvpn In server.conf plugin path for user/pass authentication: plugin /usr/lib/openvpn/openvpn-auth-pam.so system-auth For Jessie (Debian 8): plugin /usr/lib/openvpn/openvpn-plugin-auth-pam.so system-auth In case of error: Mon Dec 18 14:48:14 2017 srv02/xxx.xxx.x.x:39658 Authenticate/Decrypt packet error: cipher final failed make sure the ciphers are same in //server.conf// and //client.conf//. For unprivileged container inside Proxmox for mknod to work add this to ///etc/pve/lxc/lxc.conf//: lxc.mount.entry = /dev/net dev/net none bind,create=dir Also check owner of files on host vs container. ====== Tested on ====== * ====== See also ====== ====== References ====== * https://wiki.archlinux.org/index.php/OpenVPN_(server)_in_Linux_containers * https://robert.penz.name/1498/tips-solutions-for-settings-up-openvpn-on-debian-9-within-proxmox-lcx-containers/