idhirandar / tailscale-on-proxmox-lxc

A Comprehensive guide to install and work tailscale on proxmox lxc container
GNU General Public License v3.0
4 stars 0 forks source link

Tailscale on proxmox lxc

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.

Create a fresh ct on proxmox with privilege permission.

image

Install tailscale on container (from container cli)

curl -fsSL https://tailscale.com/install.sh | sh
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

Edit container file to allow container to intract with proxmox host (from proxmox cli)

( 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

Restart and enable tailscale services.

systemctl start tailscale
systemctl start tailscaled
systemctl enable tailscaled
systemctl enable tailcale