What's new

Block access to TikTok in the morning and evening

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

DiliMe

Regular Contributor
Hi all,
I have AC68U with Merlin and I can install AddOns if any can do that.
I want to disable access to TikTok and YouTube at specific hours in the morning and evening, but permit access to other websites in the same time.
From Parental Controls -> Time Scheduling is not possible.
Do you know of any possibility?

Thank you!
 
Hi all,
I have AC68U with Merlin and I can install AddOns if any can do that.
I want to disable access to TikTok and YouTube at specific hours in the morning and evening, but permit access to other websites in the same time.
From Parental Controls -> Time Scheduling is not possible.
Do you know of any possibility?

Thank you!
I use NextDNS for some devices(school computers). I use it via DNS-Filter for these devices and DDNS to point it to my NextDNS Account (I use the free not paid).
Works fine to block Tiktok/youtube and more (vpn`s and other bypass methods)
Link to NextDNS
It has something called "Recreation time" that has some time setting when to allow things(I have not tested this) I control it with cron jobs in the router instead (it changes between nextdns servers and cleanbrowsing servers in dns-filter at specific hours.. Did a post on it some time ago and another user made a better version on that if you can search for that.
Hope this helps
Edit:
Took me some time to find the post
The user did it a bit different then me instead of changing servers (as i do) he turns on/off dns-filter, Think the way he done it is better. I have 4 cron jobs that change servers in custom dns3 under dnsfilter and cron jobs to execute with restarting firewall and dnsmasq at specific times..
Here is a link:
Post in thread 'Schedule Guiderails' http://www.snbforums.com/threads/schedule-guiderails.70722/post-670232
 
Last edited:
Thank you Zastoff!
It seems that NextDNS - Recreation Time is doing what I want.
I'll give it a try and will let you know.
 
I have activated NextDNS but it looks that our house had made about 15.000 DNS requests in 10 hours, probably we're making ~ 20.000 reqs per 24h.
The free tier permits 300.000 requests / month or about 10.000 / day. It looks that we will not make it in the free tier.
I like NextDNS service quality and I consider purchasing the Pro tier at 2 $/mo.

But that made me curious about the average requests made by other houses similar to mine with 4 x Windows 10 (used 3-12 hours/day) and 4 x Smartphones ( 2 of them used extensively by teens).

We have made in about 10 hours (4000 requests to Microsoft + 2400 to Apple + 1600 to Google + 1000 to fB + 6000 to Others).
 
I have activated NextDNS but it looks that our house had made about 15.000 DNS requests in 10 hours, probably we're making ~ 20.000 reqs per 24h.
The free tier permits 300.000 requests / month or about 10.000 / day. It looks that we will not make it in the free tier.
I like NextDNS service quality and I consider purchasing the Pro tier at 2 $/mo.

But that made me curious about the average requests made by other houses similar to mine with 4 x Windows 10 (used 3-12 hours/day) and 4 x Smartphones ( 2 of them used extensively by teens).

We have made in about 10 hours (4000 requests to Microsoft + 2400 to Apple + 1600 to Google + 1000 to fB + 6000 to Others).
That is why i only use it for specific devices via dns-filter and only during the hours each day i want things blocked, on the rest of the day server is changed to cleanbrowsing-family server.
 
For the beginning I will manually set NextDNS on my teens' smartphones and check how it's going. But I would have preferred to have it set from the router.

Can you give little more tech details about your setup using dns-filter?

Thank you!
 
In router gui:
I have devices set in LAN/DHCP Server and enabled Enable Manual Assignment =yes and added devices to that list(so devices get same ip from the router each time)
In LAN/DNS-Filter i have:
Enable DNS-based Filtering = ON
Global Filter Mode = Router
and i change Custom (user-defined) DNS 3 with cron jobs(more info on this comes later)
You add devices to the list under dns-filter and set them to use custom3
I have DDNS set in WAN/DDNS (i use asuscomm DDNS works for me) that can be added on NextDNS settings page (that will make the link to your account on nextdns
This is the cron jobs i use for this:

Code:
#Change to NextDNS in DNS-Filter custom3
cru a NextDNS "06 06 * * 1-5 nvram set dnsfilter_custom3=45.90.28.215 && nvram commit"
cru a UpdateDNS1 "08 06 * * 1-5 service restart_firewall;restart_dnsmasq"

#Change to Cleanbrowsing-family in DNS-Filter custom3
cru a CleanFamily "16 18 * * 1-5 nvram set dnsfilter_custom3=185.228.168.168 && nvram commit"
cru a UpdateDNS2 "18 18 * * 1-5 service restart_firewall;restart_dnsmasq"
It changes custom3 field ip:
NextDNS= “At 06:08 on every day-of-week from Monday through Friday.”
CleanFamily = “At 18:18 on every day-of-week from Monday through Friday.”
Here is a link for how to edit/see how time is set: https://crontab.guru/
My Devices that is set to use custom3 DNS under DNS-filter will use NextDNS server From 06:08 until 18:18 Monday-Friday (what i call school internet) and cleanbrowsing family server in the evenings and weekends.
The Cron jobs is placed in /jffs/scripts services-start
If you do not have the file you can create it and chmod it
You can see how it is done in the link i provided in the first post (the guide tonysamson did step 1 & 5)
Restart router and it will read the cron jobs and execute at appointed time.
Hope this helps
 
Thank you very much for the detailed steps. I will give a try this week.

Best regards!
 
@Zastoff

Want to keep my son off Youtube, Netflix, etc after hours (10 pm school days 11 pm weekends). I set up OpenDNS Home to block those. Daytime, it will run through Cloudfare, which should allow those. Nighttime, it will run through OpenDNS which should block those.

I used your example as a model to set the DNSFilter on his devices to Custom3.

I modified it to run every hour instead of just the beginning of the time range. My thinking was that if I rebooted my router, it would take up to 24 hours to "catch up" but this way, it will take up to 60 minutes to catch up.

Being a noob at this, do you see any issue with what I did:
1) Did I do it correctly
2) Any issue running these every hour (will it overload or break something potentially)
3) Other

Thanks

---------------------------------


#Change to Cloudfare in DNS-Filter custom3 (8:00am - 9:59pm M-F) (7:00am 10:59pm Sat-Sun)
cru a Cloudfare "00 08-21 * * 1-5 nvram set dnsfilter_custom3=1.1.1.1 && nvram commit"
cru a Cloudfare2 "00 07-22 * * 6-7 nvram set dnsfilter_custom3=1.1.1.1 && nvram commit"

#Change to OpenDNS in DNS-Filter custom3 (10:00pm - 7:59am M-F) (11:00pm 6:59am Sat-Sun)
cru a OpenDNS "00 22-07 * * 1-5 nvram set dnsfilter_custom3=208.67.222.222 && nvram commit"
cru a OpenDNS2 "00 23-06 * * 6-7 nvram set dnsfilter_custom3=208.67.222.222 && nvram commit"

#Update DNSmasq (2 min after hour)
cru a UpdateDNS1 "02 * * * * service restart_firewall;restart_dnsmasq"
 
@Zastoff

Want to keep my son off Youtube, Netflix, etc after hours (10 pm school days 11 pm weekends). I set up OpenDNS Home to block those. Daytime, it will run through Cloudfare, which should allow those. Nighttime, it will run through OpenDNS which should block those.

I used your example as a model to set the DNSFilter on his devices to Custom3.

I modified it to run every hour instead of just the beginning of the time range. My thinking was that if I rebooted my router, it would take up to 24 hours to "catch up" but this way, it will take up to 60 minutes to catch up.

Being a noob at this, do you see any issue with what I did:
1) Did I do it correctly
2) Any issue running these every hour (will it overload or break something potentially)
3) Other

Thanks

---------------------------------


#Change to Cloudfare in DNS-Filter custom3 (8:00am - 9:59pm M-F) (7:00am 10:59pm Sat-Sun)
cru a Cloudfare "00 08-21 * * 1-5 nvram set dnsfilter_custom3=1.1.1.1 && nvram commit"
cru a Cloudfare2 "00 07-22 * * 6-7 nvram set dnsfilter_custom3=1.1.1.1 && nvram commit"

#Change to OpenDNS in DNS-Filter custom3 (10:00pm - 7:59am M-F) (11:00pm 6:59am Sat-Sun)
cru a OpenDNS "00 22-07 * * 1-5 nvram set dnsfilter_custom3=208.67.222.222 && nvram commit"
cru a OpenDNS2 "00 23-06 * * 6-7 nvram set dnsfilter_custom3=208.67.222.222 && nvram commit"

#Update DNSmasq (2 min after hour)
cru a UpdateDNS1 "02 * * * * service restart_firewall;restart_dnsmasq"
Think it works like you do but you get many restarts on dnsmasg and firewall, Do not think that is good or needed
Did a example for you:
Code:
#Change to Cloudfare in DNS-Filter custom3 (8:00am M-F) (7:00am Sat-Sun)
cru a Cloudfare "58 07 * * 1-5 nvram set dnsfilter_custom3=1.1.1.1 && nvram commit"
cru a Cloudfare2 "58 06 * * 6-7 nvram set dnsfilter_custom3=1.1.1.1 && nvram commit"

#Change to OpenDNS in DNS-Filter custom3 (10:00pm M-F) (11:00pm Sat-Sun)
cru a OpenDNS "58 21 * * 1-5 nvram set dnsfilter_custom3=208.67.222.222 && nvram commit"
cru a OpenDNS2 "58 22 * * 6-7 nvram set dnsfilter_custom3=208.67.222.222 && nvram commit"

#Update DNSmasq/Firewall (weekdays 8.00am and 10.00pm & weekends 7.00am and 11.00pm)
cru a UpdateDNS1 "00 8-23/14 * * 1-5 service restart_firewall;restart_dnsmasq"
cru a UpdateDNS2 "00 7-23/16 * * 6-7 service restart_firewall;restart_dnsmasq"
The "update DNSmasq/Firewall cronjobs" make the connected clients get the new settings from the custom3 under dns-filter, So it will not change anything in dns-filter, That is what the 4 first cron-jobs do.
Hope this helps and that i got this correct..(Really tired at the moment)
 
Think it works like you do but you get many restarts on dnsmasg and firewall, Do not think that is good or needed
Did a example for you:
Code:
#Change to Cloudfare in DNS-Filter custom3 (8:00am M-F) (7:00am Sat-Sun)
cru a Cloudfare "58 07 * * 1-5 nvram set dnsfilter_custom3=1.1.1.1 && nvram commit"
cru a Cloudfare2 "58 06 * * 6-7 nvram set dnsfilter_custom3=1.1.1.1 && nvram commit"

#Change to OpenDNS in DNS-Filter custom3 (10:00pm M-F) (11:00pm Sat-Sun)
cru a OpenDNS "58 21 * * 1-5 nvram set dnsfilter_custom3=208.67.222.222 && nvram commit"
cru a OpenDNS2 "58 22 * * 6-7 nvram set dnsfilter_custom3=208.67.222.222 && nvram commit"

#Update DNSmasq/Firewall (weekdays 8.00am and 10.00pm & weekends 7.00am and 11.00pm)
cru a UpdateDNS1 "00 8-23/14 * * 1-5 service restart_firewall;restart_dnsmasq"
cru a UpdateDNS2 "00 7-23/16 * * 6-7 service restart_firewall;restart_dnsmasq"
The "update DNSmasq/Firewall cronjobs" make the connected clients get the new settings from the custom3 under dns-filter, So it will not change anything in dns-filter, That is what the 4 first cron-jobs do.
Hope this helps and that i got this correct..(Really tired at the moment)
Maybe this is better for the kids if you control this for school and so on:
Code:
#Change to Cloudfare in DNS-Filter custom3 (8:00am Sunday-Thursday) (7:00am friday-saturday)

cru a Cloudfare "58 07 * * 0-4 nvram set dnsfilter_custom3=1.1.1.1 && nvram commit"

cru a Cloudfare2 "58 06 * * 5-6 nvram set dnsfilter_custom3=1.1.1.1 && nvram commit"



#Change to OpenDNS in DNS-Filter custom3 (10:00pm Sunday-Thursday) (11:00pm friday-saturday)

cru a OpenDNS "58 21 * * 0-4 nvram set dnsfilter_custom3=208.67.222.222 && nvram commit"

cru a OpenDNS2 "58 22 * * 5-6 nvram set dnsfilter_custom3=208.67.222.222 && nvram commit"



#Update DNSmasq/Firewall (Sunday-Thursday 8.00am and 10.00pm & friday-saturday 7.00am and 11.00pm)

cru a UpdateDNS1 "00 8-23/14 * * 0-4 service restart_firewall;restart_dnsmasq"

cru a UpdateDNS2 "00 7-23/16 * * 5-6 service restart_firewall;restart_dnsmasq"
 
Thanks, I guess I was a little confused about what would happen on a reboot. If a reboot occurs, it would retain the values that were there before the reboot (not reset), correct? So the firing off I had, every hour, was unnecessary If I understand it correctly.

The only problem I see is if I reboot at 7:59 am or 9:59 pm (Sun-Thu) or 6:59 am or 10:59pm (Fri-Sat). Then the cronjob would be missed, correct? However, that seems very unlikely. Just try to avoid rebooting those two minutes each day. Correct?

Thanks
 
For the beginning I will manually set NextDNS on my teens' smartphones and check how it's going. But I would have preferred to have it set from the router.

Can you give little more tech details about your setup using dns-filter?

Thank you!

I suppose the kids haven't caught on yet that if they turn off WiFi on the phone, they can get TikTok over the mobile connection.
 
The only problem I see is if I reboot at 7:59 am or 9:59 pm (Sun-Thu) or 6:59 am or 10:59pm (Fri-Sat). Then the cronjob would be missed, correct? However, that seems very unlikely. Just try to avoid rebooting those two minutes each day. Correct?

Correct.
 
I suppose the kids haven't caught on yet that if they turn off WiFi on the phone, they can get TikTok over the mobile connection.
They have.. even to set their mobile as a hotspot for other devices, But i pay for their mobile and control the amount of data they get each month.. So they can maybe get one maybe two days with tik tok/anime stuff and so on for each month..it up to them how to use their mobile data, waste it on the wrong hours of the day or wait until they have it on the wifi anyway (only control my kids stuff during school/homework hours).
 
In general, this can be done through the phone's settings. Your child won't even be able to open the app if you're not around. Or you can look in the platform settings to see the restrictions. As far as I know, there is the same feature, but there are differences. The main difference is that a child can open the app, but the theme of the video will be exactly what you set it to be. This is quite handy, especially when you're just starting to allow social media. There are many different mechanisms in this platform to help tailor content. For example, when we use Social Likes, we subsequently have content generated based on likes. This may be a revelation to some, but it can also be used to filter out topics.
 
Last edited by a moderator:
btw TikTok has changed their methods since this post started.
We used to block it via tiktokdns.com, but their server farm and FQDN's changed...
(this is for enterprise, not home - for HOME, we block this Chinese PLA/PRC-linked trash - yes TikTok is political - via the phone - iOS Screen Time, Amazon, Google FamilyLink or Android)
 
btw TikTok has changed their methods since this post started.
We used to block it via tiktokdns.com, but their server farm and FQDN's changed...
(this is for enterprise, not home - for HOME, we block this Chinese PLA/PRC-linked trash - yes TikTok is political - via the phone - iOS Screen Time, Amazon, Google FamilyLink or Android)
So, we have no easy way to block a certain service like tiktok on a router level? I've blocked few domains associated with it, but nothing is happening. I cannot resolve tiktok.com but apps are working just fine. On the website netify once can see many domains associated with tiktok that dont even contain tiktok in the name.
 
So, we have no easy way to block a certain service like tiktok on a router level? I've blocked few domains associated with it, but nothing is happening. I cannot resolve tiktok.com but apps are working just fine. On the website netify once can see many domains associated with tiktok that dont even contain tiktok in the name.
Tried these?
 

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

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