Created
July 13, 2022 02:21
-
-
Save nshalman/2ee472eb1ca3695908983fc2d9439a1a to your computer and use it in GitHub Desktop.
Tailscale in LX branded zones
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vmadm create -f lx-tailscale.json | |
ZONENAME=$(vmadm list -Ho zonename alias=lx-tailscale) | |
zonecfg -z ${ZONENAME?} "add device ; set match=tun ; end" | |
vmadm reboot ${ZONENAME?} | |
zlogin ${ZONENAME?} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -LO https://go.dev/dl/go1.18.4.linux-amd64.tar.gz | |
tar xzf go1.18.4.linux-amd64.tar.gz | |
apt-get update | |
apt-get -y install git | |
git clone -b illumos-1.26 https://github.com/nshalman/tailscale | |
cd tailscale | |
PATH=../go/bin:$PATH bash -x build.sh | |
cd v*illumos* | |
/native/usr/bin/elfedit -e "ehdr:ei_osabi ELFOSABI_SOLARIS" tailscale | |
/native/usr/bin/elfedit -e "ehdr:ei_osabi ELFOSABI_SOLARIS" tailscaled | |
cp tailscale tailscaled /usr/sbin/ | |
cp ../cmd/tailscaled/tailscaled.defaults /etc/default/tailscaled | |
echo PATH=/native/sbin:/native/usr/sbin:/native/usr/bin >> /etc/default/tailscaled | |
cp ../cmd/tailscaled/tailscaled.service /etc/systemd/system | |
sed '/cleanup/d;/notify/d' -i /etc/systemd/system/tailscaled.service | |
systemctl daemon-reload | |
systemctl enable --now tailscaled | |
tailscale up |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"alias": "lx-tailscale", | |
"hostname": "lx-tailscale", | |
"brand": "lx", | |
"kernel_version": "4.3.0", | |
"max_physical_memory": 2048, | |
"quota": 10, | |
"image_uuid": "0bf06d4d-b62f-4b3b-b560-3cd258df2070", | |
"resolvers": ["8.8.8.8","8.8.4.4"], | |
"nics": [ | |
{ | |
"nic_tag": "admin", | |
"ips": ["dhcp"] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment