summaryrefslogtreecommitdiff
path: root/playbooks/roles/outbound/templates/proxy/headscale/headscale-client.sh
diff options
context:
space:
mode:
authorElizabeth Hunt <me@liz.coffee>2025-04-27 21:15:30 -0700
committerElizabeth Hunt <me@liz.coffee>2025-04-27 21:25:52 -0700
commitdaef0cf448af17357b552245f39067a9d340ce3d (patch)
treef65a660f7232f057b0c14e477c166006bfb83f87 /playbooks/roles/outbound/templates/proxy/headscale/headscale-client.sh
parent1dcdfe34a74708f88aad68af965f4bb5c79adff1 (diff)
downloadinfra-daef0cf448af17357b552245f39067a9d340ce3d.tar.gz
infra-daef0cf448af17357b552245f39067a9d340ce3d.zip
Waow
Diffstat (limited to 'playbooks/roles/outbound/templates/proxy/headscale/headscale-client.sh')
-rwxr-xr-xplaybooks/roles/outbound/templates/proxy/headscale/headscale-client.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/playbooks/roles/outbound/templates/proxy/headscale/headscale-client.sh b/playbooks/roles/outbound/templates/proxy/headscale/headscale-client.sh
new file mode 100755
index 0000000..1ce0acb
--- /dev/null
+++ b/playbooks/roles/outbound/templates/proxy/headscale/headscale-client.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+/usr/local/bin/containerboot &
+
+while ! tailscale status > /dev/null 2>&1; do
+ sleep 1
+ echo '[+] Waiting for tailscale status to be up...'
+done
+
+echo '[+] Tailscale is up. Enabling NAT...'
+iptables -t nat -A POSTROUTING -o tailscale0 -j MASQUERADE
+echo '[+] Done.'
+
+tail -f /dev/null