[SOLVED] Openvpn in LXC : Tun/Tap interfaces

asteroide404

New Member
Jul 12, 2019
2
0
1
33
Hi there!

I'm user of proxmox for personnal use from some times now, and i have already get success with TAP TUN Adapter on an lxc running with a debian template.

Unfortunately, i have not writing anywhere the configuration needed for this...

Now i'm trying to create a TUN or TAP device in a CT after a complete reinstallation of proxmox.

I have read many threads about this and i get the same result everytime...

What are the configuration file of my LXC container runing on debian looks like :


Code:
root@pve:~# cat /etc/pve/lxc/201.conf
arch: amd64
cores: 2
hostname: openvpn1.lan
memory: 512
nameserver: <deliberately hidden>
net0: name=eth0,bridge=vmbr0,firewall=1,gw=192.168.1.254,hwaddr=<deliberately hidden>,ip=<deliberately hidden>/24,type=veth
ostype: debian
rootfs: local-lvm:vm-201-disk-0,size=8G
swap: 512
unprivileged: 1
lxc.cgroup.devices.allow : c 10:200 rwm
lxc.hook.autodev: sh -c "modprobe tun; cd ${LXC_ROOTFS_MOUNT}/dev; mkdir net; mknod net/tun c 10 200; chmod 0666 net/tun"

Well, when i'm trying the following :
Code:
mkdir -p /dev/net
mknod -m 666 /dev/net/tun c 10 200

With or without the last and the penultimate lines of the ct config files, the system answer me :

Code:
Operation not permitted


I'm sorry to get another thread about this, but i'm tired to read in all of my search the sames reply to add or not add the hooks autodev lines etc...
 
Yes i have try with the option "unprivileged" option set at 0 but there is nothing changes for
The settings is exactly the same as mine except the unprivileged setting. Have you tried without?

Dude thank's you very much for your time, and your anwser.

The that i have forget unchecking the box 'unprivileged', i have when i try all of this to disable this feature by setting her to 0...

Have a nice day
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!