/usr/sbin/cru a WANOFF "0 2 * * * nvram set wan0_enable=0 && nvram commit"
/usr/sbin/cru a WANON "0 6 * * * nvram set wan0_enable=1 && nvram commit"
/jffs/scripts/services-start
file, so these jobs will survive a reboot.Not working seems i tested with a lot of days but wan service isnt turned off/onTotally a wild guess, but I'm thinking you could do this:
Code:/usr/sbin/cru a WANOFF "0 2 * * * nvram set wan0_enable=0 && nvram commit" /usr/sbin/cru a WANON "0 6 * * * nvram set wan0_enable=1 && nvram commit"
This would add 2 cronjobs... one will turn the WAN off at 2am, the other will turn it back on at 6am. Good luck!
And if that works out for you, you'd need to add these 2 statements to your/jffs/scripts/services-start
file, so these jobs will survive a reboot.
Can you test it manually? Just run these 2 commands on your router... and see if it turns off your WAN?Not working seems i tested with a lot of days but wan service isnt turned off/on
nvram set wan0_enable=0
nvram commit
It does work, it turns the wan service off, but it does not leave me without internet.Can you test it manually? Just run these 2 commands on your router... and see if it turns off your WAN?
Code:nvram set wan0_enable=0 nvram commit
Nice call, @JGrana! So in that case, @brodas ... you could do something like this:You might want to try these.
Code:service stop_wan
Should bring down the wan interface.
Code:service start_wan
Should bring it back up.
I just tested this on an AX58U running 3004.388.6 and it worked fine.
/usr/sbin/cru a WANOFF "0 2 * * * service stop_wan"
/usr/sbin/cru a WANON "0 6 * * * service start_wan"
You might want to try these.
Code:service stop_wan
Should bring down the wan interface.
Code:service start_wan
Should bring it back up.
I just tested this on an AX58U running 3004.388.6 and it worked fine.
Thank you very much to both of you. I have updated the call and see if it works. I will let you know later.
So you can "go dark"... don't you do this? Then the hackers can't find you between 10pm and 6am!May I ask why is this needed? Thank you.
From an SSH prompt, make sure you see these 2 jobs in your list by running:Thank you very much to both of you. I have updated the call and see if it works. I will let you know later.
cru l
If you have a provider that gives you dynamic ip, with this script your ip will rotate while you sleep. And if you have scraping scripts then they will skip the ban while you sleep or do other things. I expect that it has served you.May I ask why is this needed? Thank you.
Then the hackers can't find you between 10pm and 6am!
Bots schmotsAh, okay. Then bots find your new IP in minutes after you go live. Got it.
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!