iptables -t nat -I PREROUTING -i br0 -p udp -m mac --mac-source 01:02:03:04:05:06 --dport 53 -m time --timestart 20:00 --timestop 00:00 --weekdays Mon,Tue,Wed,Thu,Fri,Sat,Sun --kerneltz -j DNAT --to 208.67.222.222
iptables -t nat -I PREROUTING -i br0 -p udp -m mac --mac-source 01:02:03:04:05:06 --dport 53 -m time --timestart 00:00 --timestop 08:00 --weekdays Mon,Tue,Wed,Thu,Fri,Sat,Sun --kerneltz -j DNAT --to 208.67.222.222
iptables -t nat -I PREROUTING -i br0 -p tcp -m mac --mac-source 01:02:03:04:05:06 --dport 53 -m time --timestart 20:00 --timestop 00:00 --weekdays Mon,Tue,Wed,Thu,Fri,Sat,Sun --kerneltz -j DNAT --to 208.67.222.222
iptables -t nat -I PREROUTING -i br0 -p tcp -m mac --mac-source 01:02:03:04:05:06 --dport 53 -m time --timestart 00:00 --timestop 08:00 --weekdays Mon,Tue,Wed,Thu,Fri,Sat,Sun --kerneltz -j DNAT --to 208.67.222.222
I change one of the custom fields under dnsfilter with cron-jobs, It changes from nextdns(custom setup) to cleanbrowsing-family on my kids school laptops..
It works but can maybe be done better..
Here is a post i did on how to set it up:
Block access to TikTok in the morning and evening
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...www.snbforums.com
I have used this for some time on my 87u and on my current ax88u and i had no issues with this so far, Sure i guess you can get it wrong if a reboot happens at the precise time the cron should have changed the custom 3 under dns-filter.. I guess i avoid rebooting during those timesSeems to me there's a minor flaw in this approach. What if the router is rebooted? Won't the current DNS filter simply be whatever is the default, at least until the cronjob is triggered again for the relevant time period?
You may think a reboot is unlikely, but these little devils will often experiment by intentionally rebooting the router to see if it makes a difference.
That's always the problem w/ these types of changes based on the scheduler. You're trying to cover a given time period, NOT just trip an event and have it be over. So you have to account for the possibility of a reboot and make sure to set the rules correctly for the current time.
Or maybe my concerns have been addressed and I just missed it.
I have used this for some time on my 87u and on my current ax88u and i had no issues with this so far, Sure i guess you can get it wrong if a reboot happens at the precise time the cron should have changed the custom 3 under dns-filter.. I guess i avoid rebooting during those times
Edited my replay:It doesn't require any precision. Any time the router is rebooted, regardless of any scheduled changes you may have instituted, it returns to its defaults until such time as the relevant cronjob is triggered again. Also, as I said, clever kids learn that rebooting a router will sometimes get around restrictions parents have imposed. If they don't learn it themselves, they learn it from their classmates.
Anyway, it's just something to take into consideration. Things may not always go as planned.
A reboot will not reset custom 3 value, The last executed cron job will be the default value in custom 3 until the next cron job is executed and at reboot the crons are read from services-start
A reboot will not reset custom 3 value, The last executed cron job will be the default value in custom 3 until the next cron job is executed and at reboot the crons are read from services-start
You mean the kids will learn the time it changes the value? and reboot at the precise time ?Well this is what I was saying. Am I missing something where this possibility is covered.
He’s committing the current DNS IP in nvram and restarting the firewall for it to take effect. Should be fine after a reboot.Well this is what I was saying. Am I missing something where this possibility is covered.
He’s committing the current DNS IP in nvram and restarting the firewall for it to take effect. Should be fine after a reboot.
squid
to check SNI for TLS.You mean the kids will learn the time it changes the value? and reboot at the precise time ?
Why use DNS and IP addresses to filter traffic? Most devices these days can easily set up encrypted DNS.
I think we can using entware to installsquid
to check SNI for TLS.
I don't understand what is the reason for this, but I mean DNS based filtering is outdated and many modern devices can bypass them. If just to block ads, it will not have any good effect, especially now that most websites put ads and content on the same domain.The goal here is to change the DNS provider at different times of the day. Encryption (having it or the lack of it) is NOT the issue.
I don't understand what is the reason for this, but I mean DNS based filtering is outdated and many modern devices can bypass them. If just to block ads, it will not have any good effect, especially now that most websites put ads and content on the same domain.
In my case i use this on my kids school devices and the devices is set to use NextDNS (a custom config) during the day when they have school and homework and it use a bypass blocklist that blocks most vpn`s and encrypted dns bypass options, They have not been able yet to bypass this .I don't understand what is the reason for this, but I mean DNS based filtering is outdated and many modern devices can bypass them. If just to block ads, it will not have any good effect, especially now that most websites put ads and content on the same domain.
Those may be valid points. But *why* the OP has chosen to do this is an entirely different subject. And maybe worthy of discussion if the OP feels compelled to address it. All @Zastoff and I were attempting to address is the immediate problem.
Welcome To SNBForums
SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.
If you'd like to post a question, simply register and have at it!
While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!