Tailscale: Document how to run (or package) Tailscale for LXC under Proxmox

Created on 16 Feb 2020  路  6Comments  路  Source: tailscale/tailscale

Describe the bug
Tailscale won't start and logs :

CreateTUN: no such file or directory
Error starting wireguard engine: no such file or directory

Because in LXC, the wireguard module is loaded on the host machine (Like a Proxmox) and not in the container. I think that's why the bug occurs because i've made 3 times the same install and this is the only one that failed.

To Reproduce
Steps to reproduce the behavior:

  1. Setup a Debian LXC Container in Proxmox
  2. Install wireguard for Proxmox CT
  3. Install Tailscale for Debian
  4. See error

Expected behavior
Tailscale has to start and work normally

Version information:

  • Device: LXC Container
  • OS: Debian
  • OS version: 9
  • Tailscale version: 0.94-236

Additional context
I've added the default (41641) port as UDP forward on my Proxmox NAT but still won't start

enhancement help wanted

Most helpful comment

Fixed !
I've added

lxc.cgroup.devices.allow: c 10:200 rwm
lxc.mount.entry: /dev/net/tun dev/net/tun none bind,create=file

to the LXC file in /etc/pve/lxc/XXX.conf and now it's working !

All 6 comments

See https://www.cloudhosting.lv/eng/faq/How-to-enable-tun-tap-inside-LXC for how to use TUN with LXC.

Hi, thank you for your answer but i've tried, (i didn't have /etc/rc.local so i created it) but still the same error...

Those instructions probably only apply to old OSes that use sysvinit. Can you try running this manually (as root) in the LXC container, and see if Tailscale can start after that?

mkdir -p /dev/net
mknod /dev/net/tun c 10 200
chmod 600 /dev/net/tun

https://forum.proxmox.com/threads/how-to-enable-tun-tap-in-a-lxc-container.25339/ is another set of similar instructions.

Unfortunately it looks like tuntap devices in LXC isn't a very well supported config in Proxmox :(

mknod /dev/net/tun c 10 200

Returns me mknod: /dev/net/tun: Operation not permitted
So i don't know what do to do...

Fixed !
I've added

lxc.cgroup.devices.allow: c 10:200 rwm
lxc.mount.entry: /dev/net/tun dev/net/tun none bind,create=file

to the LXC file in /etc/pve/lxc/XXX.conf and now it's working !

Was this page helpful?
0 / 5 - 0 ratings