changed args and update and no nat
All checks were successful
Build and Push mikrotik-tailscale Container / build-and-push-arch (arm64) (push) Successful in 10s
Build and Push mikrotik-tailscale Container / build-and-push-arch (amd64) (push) Successful in -5s
Build and Push mikrotik-tailscale Container / merge-images-via-manifest (push) Successful in -10s
All checks were successful
Build and Push mikrotik-tailscale Container / build-and-push-arch (arm64) (push) Successful in 10s
Build and Push mikrotik-tailscale Container / build-and-push-arch (amd64) (push) Successful in -5s
Build and Push mikrotik-tailscale Container / merge-images-via-manifest (push) Successful in -10s
This commit is contained in:
parent
1c1914c287
commit
aef338d1f6
1 changed files with 12 additions and 9 deletions
|
|
@ -1,6 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
echo "Starting Tailscale with ARGS: $ARGS"
|
||||
echo "Starting Tailscale with ARGS: $up"
|
||||
echo "Setting Tailscale ARGS: $set"
|
||||
|
||||
# Enable IP forwarding
|
||||
echo 1 > /proc/sys/net/ipv4/ip_forward
|
||||
|
|
@ -8,20 +9,22 @@ echo 1 > /proc/sys/net/ipv6/conf/all/forwarding
|
|||
|
||||
# Try to enable NAT for Tailscale (may fail on MikroTik due to limited kernel modules)
|
||||
# This is optional for basic Tailscale functionality
|
||||
if iptables -t nat -A POSTROUTING -o tailscale0 -j MASQUERADE 2>/dev/null; then
|
||||
echo "NAT masquerading enabled"
|
||||
else
|
||||
echo "Warning: Could not enable NAT masquerading (kernel modules not available)"
|
||||
echo "Tailscale will still work for basic connectivity"
|
||||
fi
|
||||
# if iptables -t nat -A POSTROUTING -o tailscale0 -j MASQUERADE 2>/dev/null; then
|
||||
# echo "NAT masquerading enabled"
|
||||
# else
|
||||
# echo "Warning: Could not enable NAT masquerading (kernel modules not available)"
|
||||
# echo "Tailscale will still work for basic connectivity"
|
||||
# fi
|
||||
|
||||
tailscale update --yes
|
||||
|
||||
# Initialize and start Tailscale
|
||||
tailscaled > /dev/null 2>&1 &
|
||||
sleep 5
|
||||
tailscale up ${ARGS}
|
||||
tailscale up ${up}
|
||||
tailscale set ${set}
|
||||
|
||||
while true; do
|
||||
tailscale netcheck
|
||||
sleep 10
|
||||
sleep 600
|
||||
done
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue