[SOLVED] Openvpn in LXC : Tun/Tap interfaces

Discussion in 'Proxmox VE: Installation and configuration' started by asteroide404, Jul 12, 2019.

Tags:
  1. asteroide404

    asteroide404 New Member

    Joined:
    Jul 12, 2019
    Messages:
    2
    Likes Received:
    0
    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...
     
  2. LnxBil

    LnxBil Well-Known Member

    Joined:
    Feb 21, 2015
    Messages:
    3,798
    Likes Received:
    346
    The settings is exactly the same as mine except the unprivileged setting. Have you tried without?
     
    asteroide404 likes this.
  3. asteroide404

    asteroide404 New Member

    Joined:
    Jul 12, 2019
    Messages:
    2
    Likes Received:
    0
    Yes i have try with the option "unprivileged" option set at 0 but there is nothing changes for
    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
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice