I have the abyss webserver (very neat -- can someone update the .pet to the latest version pls?) running on puppy 3.0.
The idea is to make some large photo albums available to friends.
My ISP provides lots of bandwidth between 00:00 and 16:00 and little between 16:00 and 00:00.
I want to exclude access between the latter times for obvious reasons.
Ideally I'd have the port on which abyss is running closed during that time but my router is not sophisticated enough to do that.
I have iptables set up (via wizard -- i'm not clever enough to understand how to manually craft it) with all ports except that one closed.
So I think that the only way I am going to be able to do this is to start abyssws on boot then run a cron job to kill it at 16:00 every day.
Or is there way to have a script that will reconfigure iptables "on the fly" and use cron to control that?
Or is there a "better" solution that someone knows of?
thanks
paul
Struggling to control access to a server using cron[SOLVED]
Struggling to control access to a server using cron[SOLVED]
Last edited by paulh177 on Thu 01 Nov 2007, 07:55, edited 2 times in total.
Pschedule is a frontend to cron that is easier to use than gcrontab...here is the link maybe it will help you get started.. http://www.murga-linux.com/puppy/viewto ... 1530290542
zigbert is pretty open to sugestions if you can think of ideas how to make his programs better
zigbert is pretty open to sugestions if you can think of ideas how to make his programs better
Taking Puppy Linux to the limit of perfection. meanwhile try "puppy pfix=duct_tape" kernel parem eater.
X86: Sager NP6110 3630QM 16GB ram, Tyan Thunder 2 2x 300Mhz
Sun: SS2 , LX , SS5 , SS10 , SS20 ,Ultra 1, Ultra 10 , T2000
Mac: Platinum Plus, SE/30
X86: Sager NP6110 3630QM 16GB ram, Tyan Thunder 2 2x 300Mhz
Sun: SS2 , LX , SS5 , SS10 , SS20 ,Ultra 1, Ultra 10 , T2000
Mac: Platinum Plus, SE/30
I'm struggling to make cron work. I've looked at the various threads where others have also struggled with the same problem, but ...
I've put into rc.local
ps shows crond as running after a reboot
I've setup cron jobs using Pschedule and/or Gcrontab and they are sitting happily in the file /var/spool/cron/crontabs/root. It doesn't seem to contain tabs.
To test I've got a little script which echoes a few characters to file in /root ... but it is not being executed and i've even remembered to set it executable.
My cronjobs.log file contains nothing except a line indicating crond has started.
/var/log/messages also notes crond starting up but I also noticed that the kernel timestamps were different from my local time so I reset the time in puppy (it was set to perth not london)
Dunno what else to try/check ...
paul
I've put
Code: Select all
/usr/sbin/crond -L /tmp/cronjobs.log
ps shows crond as running after a reboot
I've setup cron jobs using Pschedule and/or Gcrontab and they are sitting happily in the file /var/spool/cron/crontabs/root. It doesn't seem to contain tabs.
To test I've got a little script which echoes a few characters to file in /root ... but it is not being executed and i've even remembered to set it executable.
My cronjobs.log file contains nothing except a line indicating crond has started.
/var/log/messages also notes crond starting up but I also noticed that the kernel timestamps were different from my local time so I reset the time in puppy (it was set to perth not london)
Dunno what else to try/check ...
paul