Think this enable/disable dns-filter and for it to take effect.
Code:
nvram set dnsfilter_enable_x=0 or 1
nvram commit
service restart_firewall;restart_dnsmasq
Thank you so much. Based on your advise, I did the following:
1. Created a file named "services-start" in /jffs/scripts/
Code:
nano /jffs/scripts/services-start
2. In /jffs/scripts/services-start, I wrote this:
Bash:
#!/bin/sh
# This script gets called after all other system services
# have been started at boot on router
# ---------------------------------------------------------
cru a OnDNSFilter "0 18 * * 7 /jffs/scripts/On_DNS_Filter.sh"
cru a OffDNSFilter "0 15 * * 5 /jffs/scripts/Off_DNS_Filter.sh"
3. The Cron Job above will turn on DNS Filter at 6pm every Sunday and turn it off at 3pm every Friday.
5. Then I made "services-start" executable thru this command:
Code:
chmod a+rx /jffs/scripts/services-start
6. Created a script to turn On the DNS Filter:
Code:
nano /jffs/scripts/On_DNS_Filter.sh
7. In the On_DNS_Filter.sh file, I wrote the following:
Bash:
#!/bin/sh
# Purpose: Turn On DNS Filter. Block kids internet access
# Author: Tony Samson
# -------------------------------------------------------------
nvram set dnsfilter_enable_x=1
nvram commit
service restart_firewall
service restart_dnsmasq
8. Exited. Ctrl-X. Then saved the file. Then I made "On_DNS_Filter.sh" executable thru this command:
Code:
chmod a+rx /jffs/scripts/On_DNS_Filter.sh
9. Created a script to turn Off the DNS Filter:
Code:
nano /jffs/scripts/Off_DNS_Filter.sh
10. In the Off_DNS_Filter.sh file, I wrote the following:
Bash:
#!/bin/sh
# Purpose: Turn off DNS Filter. Allow kids internet access
# Author: Tony Samson
# -------------------------------------------------------------
nvram set dnsfilter_enable_x=0
nvram commit
service restart_firewall
service restart_dnsmasq
11. Exited. Ctrl-X. Then saved the file. Then I made "Off_DNS_Filter.sh" executable thru this command:
Code:
chmod a+rx /jffs/scripts/Off_DNS_Filter.sh
I'm sure other people will have a better way to do this. I just wanna write it down so others, not as technically proficient can also do it. Thank you so much for this very helpful community.
Btw, please let me know if I did something wrong. I won't really know if I did it right until my kids will complain about it. LOL.