Enable TUN/TAP device for Tailscale in LXC container

Add necessary LXC configuration entries to allow TUN/TAP device access
This commit is contained in:
Damien
2026-05-04 14:39:07 +02:00
parent 49d6920f44
commit b36e729e08

View File

@@ -96,6 +96,13 @@ create_lxc() {
--features nesting=1,keyctl=1 \ --features nesting=1,keyctl=1 \
--start 0 --start 0
log_info "Enabling TUN/TAP device for Tailscale..."
cat >> "/etc/pve/lxc/${CTID}.conf" <<EOF
lxc.cgroup2.devices.allow: c 10:200 rwm
lxc.mount.entry: /dev/net dev/net none bind,create=dir
lxc.mount.entry: /dev/net/tun dev/net/tun none bind,create=file
EOF
log_info "Starting LXC $CTID..." log_info "Starting LXC $CTID..."
pct start "$CTID" pct start "$CTID"
sleep 5 sleep 5