Update CleanBrowsing with a Dynamic IP (Scheduled Task)

If your ISP assigns a dynamic public IP, CleanBrowsing may lose track of your network. This guide shows you how to automate IP updates using simple scheduled scripts on Windows, macOS, and Linux.

Step 1: Get Your Dynamic Update URL

CleanBrowsing provides a dynamic update endpoint you can call to register your current public IP. Find your unique update key in your CleanBrowsing dashboard under Settings > Dynamic IP.

The endpoint format is:

https://my.cleanbrowsing.org/dynip/update?key=YOUR-UNIQUE-KEY

Replace YOUR-UNIQUE-KEY with the key from your dashboard.

Step 2: Create a Bash Script (Linux/macOS)

Create a script that fetches your current public IP and sends it to CleanBrowsing:

#!/bin/bash
CURRENT_IP=$(curl -s https://checkip.amazonaws.com)
curl -s "https://my.cleanbrowsing.org/dynip/update?key=YOUR-UNIQUE-KEY&ip=$CURRENT_IP"

Save this as update-cb-ip.sh and make it executable:

chmod +x update-cb-ip.sh

Step 3: Create a PowerShell Script (Windows)

For Windows systems, use PowerShell:

$ip = (Invoke-RestMethod -Uri "https://checkip.amazonaws.com").Trim()
Invoke-WebRequest -Uri "https://my.cleanbrowsing.org/dynip/update?key=YOUR-UNIQUE-KEY&ip=$ip" -UseBasicParsing

Save this as update-cb-ip.ps1 in a folder you can reference later.

Step 4: Schedule with Cron (Linux/macOS)

Open your crontab editor:

crontab -e

Add the following line to run the script every 10 minutes:

*/10 * * * * /path/to/update-cb-ip.sh

Save and exit. Your IP will now be checked and updated automatically every 10 minutes.

Step 5: Schedule with Task Scheduler (Windows)

  1. Open Task Scheduler (search for it in the Start menu).
  2. Click Create Basic Task.
  3. Name it CleanBrowsing IP Update and click Next.
  4. Select Daily, then set to repeat every 10 minutes.
  5. Choose Start a Program and enter:
    powershell.exe -ExecutionPolicy Bypass -File "C:\path\to\update-cb-ip.ps1"
  6. Check Run whether user is logged on or not and click Finish.

Alternative: Use a DDNS Service

Instead of a scheduled script, you can configure your router's built-in Dynamic DNS (DDNS) feature with a provider like No-IP or DynDNS. Then reference your DDNS hostname in CleanBrowsing instead of a static IP address.

This approach works well if your router supports DDNS natively, as the router handles IP updates automatically.

Tip: Whichever method you choose, test it by restarting your modem (to trigger an IP change) and verifying that CleanBrowsing picks up the new address within a few minutes.

Related Guides

CleanBrowsing API

Full API reference for managing filters and network settings programmatically.

Importance of Public IPs

Why your public IP matters for DNS filtering and what to do if it changes.

Common Questions

Answers to frequently asked questions about CleanBrowsing setup.

Need Help?

Check our support hub or contact support.

Support Hub