Skip to content

Instantly share code, notes, and snippets.

@dragolabs
Last active December 30, 2022 17:11
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dragolabs/6ac9d7010326357ace4747f32aacc342 to your computer and use it in GitHub Desktop.
Save dragolabs/6ac9d7010326357ace4747f32aacc342 to your computer and use it in GitHub Desktop.
Openvpn server in lxc container

How to run openvpn in LXC container

For running openvpn server (or client) in CT you need to create tun (tap?) device.

In lxc config of container add line above. In proxmox we can find configs in /etc/pve/local/lxc/

lxc.cgroup.devices.allow: c 10:200 rwm

Then [re]start container and create tun device inside it. You can login into container or use proxmox tool pct:


pct exec 100 mkdir -p /dev/net
pct exec 100 mknod /dev/net/tun c 10 200
pct exec 100 chmod 600 /dev/net/tun
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment