From aef338d1f6a62bf5fa03b2047ed6adc4c444c53f Mon Sep 17 00:00:00 2001 From: Xaver Russ Date: Thu, 23 Oct 2025 03:13:19 +0200 Subject: [PATCH] changed args and update and no nat --- .../mikrotik-tailscale/start-tailscale.sh | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/containers/mikrotik-tailscale/start-tailscale.sh b/containers/mikrotik-tailscale/start-tailscale.sh index 79ef1d7..30bc9e9 100644 --- a/containers/mikrotik-tailscale/start-tailscale.sh +++ b/containers/mikrotik-tailscale/start-tailscale.sh @@ -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