If your router can't update its address automatically, you can have any computer on the same connection do it instead, on a schedule, running quietly in the background.
Overview
- It doesn't matter which machine calls in β what gets recorded is the address your connection is using, not the computer's own.
- A laptop, a NAS or a small server all work equally well. Pick one that's usually switched on.
- You'll copy a ready-made command from InfraNest, then set your computer to run it automatically every few minutes.
Get the command
- Go to Dynamic IPs, open your Dynamic IP, and select Setup.
- Choose Command line at the top.
- Copy the complete command shown β your details are already filled in. You'll paste it into a scheduler below.
The command is a single web request. Running it once updates your address immediately, which is a good way to confirm everything works before scheduling it.
NoteThe command contains your password. Anyone who can read the file or task you save it in can use it, so keep it somewhere only you can read.
Choose how often to run it
Every five minutes is a sensible default. Calling more often achieves nothing β InfraNest only acts when the address actually changed β and calling much less often means a longer gap between your address changing and your records catching up.
Set it up on Linux (cron)
- Run
crontab -e. - Add a line like this:
*/5 * * * * curl -sS -u 'USERNAME:PASSWORD' 'https://YOUR-SERVER/' >/dev/null 2>&1
- Replace the whole
curl β¦part with the command you copied from the Setup tab. - Save and close the file β cron picks it up straight away.
To confirm it's running, temporarily remove the >/dev/null 2>&1 part and check your mail or the cron log. A working call replies with good followed by your address, or nochg if it hasn't changed.
Set it up on macOS (cron)
macOS still has cron, and it's the simplest option β the Linux instructions above apply exactly.
If you'd rather use launchd (Apple's preferred scheduler):
- Create a Launch Agent file in
~/Library/LaunchAgents/. - Have it run the same command, with
StartIntervalset to300. - Load it with
launchctl load.
Both approaches work; cron needs less setup.
NoteOn a laptop, neither scheduler runs while the machine is asleep. That's usually fine, since nothing needs updating while you're not connected β but the first update after waking may take a few minutes.
Set it up on Windows (Task Scheduler)
Windows has no built-in dynamic DNS client, so a scheduled task is the way to go.
- Open Task Scheduler and choose Create Task (not the basic wizard β you need the extra options).
- On the General tab, tick Run whether user is logged on or not.
- On the Triggers tab, add a trigger: At startup, then tick Repeat task every 5 minutes for a duration of Indefinitely.
- On the Actions tab, add an action that starts
powershell.exewith arguments like these, using the values from the Setup tab:
-NoProfile -WindowStyle Hidden -Command "Invoke-WebRequest -Uri 'https://YOUR-SERVER/' -Credential (New-Object PSCredential('USERNAME',(ConvertTo-SecureString 'PASSWORD' -AsPlainText -Force))) -UseBasicParsing"
- Select Save. Windows will ask for your account password so the task can run in the background.
- Select Run on the task once to confirm it works, then check the Setup tab β it should show the check-in within a few seconds.
Confirm it's working
- Go back to the Setup tab.
- Look at Has your router reached us? β it shows when the last call arrived, from which address, and whether the password was right.
- Leave the tab open β it updates by itself.
Tips
TipRun the command once by hand before you schedule it. If it works immediately, you'll know any later issue is with the scheduler, not the command itself.
Was this article helpful?