Simple yet effective guide to install tailscale on proxmox lxc conatainer in this demonstration i used Ubuntu 20.4 standard for other distro you can used tailscale offecial guide.
- This script will install tailscale package. (from tailscale offcial site )
curl -fsSL https://tailscale.com/install.sh | sh
- Enable ip forwading on container (container cli)
echo 'net.ipv4.ip_forward = 1' | sudo tee -a /etc/sysctl.d/99-tailscale.conf
echo 'net.ipv6.conf.all.forwarding = 1' | sudo tee -a /etc/sysctl.d/99-tailscale.conf
sudo sysctl -p /etc/sysctl.d/99-tailscale.conf
- Monunt the tuntap devices to the lxc container from proxmox host.
( Replace xxx with your_container_id on proxmox)
echo 'lxc.cgroup.devices.allow: c 10:200 rwm' >> /etc/pve/lxc/xxx.conf
echo 'lxc.mount.entry: /dev/net/tun dev/net/tun none bind,create=file' >> /etc/pve/lxc/xxx.conf
systemctl start tailscale
systemctl start tailscaled
systemctl enable tailscaled
systemctl enable tailcale