Works for SIT (6in4) and GRE
WireGuard tunnels follow your address automatically and don't need this.
1
Generate the update URL
In the dashboard open Your tunnels → Dynamic IP → Generate update URL. The URL contains a secret key and is shown only once — save it. Lost it? Generate a new one; the old one stops working immediately.
update URL
https://SITE/api/update?tunnel=TUNNEL_NAME&key=YOUR_KEY2
Call it from your router
Call the URL every 5 minutes, or whenever your WAN reconnects. Calls without a change cost nothing. Without &ip= the address the request comes from is used.
crontab
# crontab -e (every 5 minutes)
*/5 * * * * curl -fsS "https://SITE/api/update?tunnel=TUNNEL_NAME&key=YOUR_KEY" >/dev/nullRouterOS
/system scheduler add name=ghosttunnel-ddns interval=5m \
on-event="/tool fetch url=\"https://SITE/api/update?tunnel=TUNNEL_NAME&key=YOUR_KEY\" mode=https keep-result=no"shell
# /etc/hotplug.d/iface/90-ghosttunnel (runs when WAN comes up)
[ "$ACTION" = ifup ] && [ "$INTERFACE" = wan ] && \
wget -qO- "https://SITE/api/update?tunnel=TUNNEL_NAME&key=YOUR_KEY" >/dev/null- Services → Dynamic DNS → Add, service type Custom.
- Interface to monitor: your WAN.
- Update URL: paste your update URL (without
&ip=). - Result match:
good|nochg. Save and force an update.
3
Check the response
good 1.2.3.4The tunnel was moved to the new IPv4. Your side of the tunnel keeps the same IPv6.nochg 1.2.3.4The address didn't change — normal for most calls.badauthWrong tunnel name or key. Generate a new URL in the dashboard.badipThe address is private or invalid (e.g. you are behind CGNAT). Use WireGuard instead.abuseToo many changes (more than 10 per hour) or the account is blocked. Wait an hour.911The PoP couldn't apply the change right now. It retries on your next call.Keep the URL secret
Anyone with the URL can move your tunnel to another IPv4. Don't paste it into public forums or screenshots. Use Turn off in the dashboard if it leaked.