Skip to content

Instantly share code, notes, and snippets.

@janglapuk
Created August 18, 2025 05:41
Show Gist options
  • Select an option

  • Save janglapuk/48fed29fe8c2a8870986bb2704b1a3c4 to your computer and use it in GitHub Desktop.

Select an option

Save janglapuk/48fed29fe8c2a8870986bb2704b1a3c4 to your computer and use it in GitHub Desktop.
Tailscale DERP to RouterOS Address List
#!/bin/bash
# Usage:
# bash tailscale-derp-rsc.sh > ts-derp.rsc
echo "/ip firewall address-list"
curl -s https://login.tailscale.com/derpmap/default | \
jq '.Regions[].Nodes[] | "add list=Tailscale-DERP address=\(.IPv4) comment=\(.HostName)"' | \
sed -e 's/"//g'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment