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

This commit is contained in:
Xaver Russ 2025-10-23 03:13:19 +02:00
parent 1c1914c287
commit aef338d1f6

View file

@ -1,6 +1,7 @@
#!/bin/sh #!/bin/sh
echo "Starting Tailscale with ARGS: $ARGS" echo "Starting Tailscale with ARGS: $up"
echo "Setting Tailscale ARGS: $set"
# Enable IP forwarding # Enable IP forwarding
echo 1 > /proc/sys/net/ipv4/ip_forward 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) # Try to enable NAT for Tailscale (may fail on MikroTik due to limited kernel modules)
# This is optional for basic Tailscale functionality # This is optional for basic Tailscale functionality
if iptables -t nat -A POSTROUTING -o tailscale0 -j MASQUERADE 2>/dev/null; then # if iptables -t nat -A POSTROUTING -o tailscale0 -j MASQUERADE 2>/dev/null; then
echo "NAT masquerading enabled" # echo "NAT masquerading enabled"
else # else
echo "Warning: Could not enable NAT masquerading (kernel modules not available)" # echo "Warning: Could not enable NAT masquerading (kernel modules not available)"
echo "Tailscale will still work for basic connectivity" # echo "Tailscale will still work for basic connectivity"
fi # fi
tailscale update --yes
# Initialize and start Tailscale # Initialize and start Tailscale
tailscaled > /dev/null 2>&1 & tailscaled > /dev/null 2>&1 &
sleep 5 sleep 5
tailscale up ${ARGS} tailscale up ${up}
tailscale set ${set}
while true; do while true; do
tailscale netcheck tailscale netcheck
sleep 10 sleep 600
done done