User Tools

Site Tools


wiki:install_openvpn_lxc

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

wiki/install_openvpn_lxc.txt · Last modified: 2022/09/27 10:42 by antisa

Except where otherwise noted, content on this wiki is licensed under the following license: CC0 1.0 Universal
CC0 1.0 Universal Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki