How do I use a user script to notify my DNS filtering service of my new dynamic IP address?

  • ATTENTION! As of November 1, 2020, you are not able to reply to threads 6 months after the thread is opened if there are more than 500 posts in the thread.
    Threads will not be locked, so posts may still be edited by their authors.
    Just start a new thread on the topic to post if you get an error message when trying to reply to a thread.

orbital-chicken

New Around Here
Until today, I used a script called by a cron on my Linux computer, to notify my DNS based filtering service of my current public IP address. (I use cleanbrowsing.org)
However, my computer is not always on.
So I want to move this notification to my router (rt-ac68u with the latest Merlin firmware) to be sure that my kid's iPhone use my filter customizations (because I have a Cleanbrowsing account with custom filters).

My script is:
Bash:
#! / bin / bash
curl https://my.cleanbrowsing.org/dynip/(my-id)> / dev / null 2> & 1

How do I go about implementing this as a user script in Merlin?
I would like it to be run periodically (or when my internet provider changes my IP address, if there is an event for that in Merlin).
Thank you in advance for your help.
(related documentation but for windows: https://cleanbrowsing.org/guides/account-for-public-ips-that-change-w-windows/)
 

dave14305

Part of the Furniture
You could go a couple different ways. Enable DDNS with a custom provider and put your script in ddns-start, or else write a slightly more complicated script for dhcpc-event when $1 = “bound”.

The router uses #!/bin/sh instead of bash.

Or you could setup a new cron on the router (using cru) to run every 5 minutes if you really wanted to, but the router will know exactly when the WAN IP changes, versus the shotgun “every 5 minutes” approach.
 

heysoundude

Very Senior Member
DDNS for sure.
while you're pondering on the subject/issue of DNS filtering/blocking - further to @dave14305 's "different ways" and just so you can get out ahead of any potential problems/disappointments: what's your backup for when the system/service fails? do/will you have physical control of the iPhone/settings/user until they're sufficiently adult/prepared? (Steve Jobs apparently didn't let his kids use his company's devices - I suspect at least partially for the same reasons you're trying to accomplish.) Otherwise, you'll likely want to include any reference to TOR or VPNs like WireGuard in your filters for when they go looking for ways to bypass cleanbrowsing/Firewalls on their devices.
 

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top