I'm having some trouble with the time parameter for a banned client in the restrict.cfg of Freesco 0.4.1. What I want to achive is to ban internet access to one of the clients on my network between the hours of 11pm and 6am.
I have the following line in my etc/restrict.cfg file:
bl,00:02:8a:98:f8:47,2300,600
I find that this works, as long as the router is already running when 11pm comes around. I don't leave my computers running permanently, I switch them off when they are not in use - including the router. The problem occurs when the router is switched on and boots during the "banned" time.
For example, if the router is switched on at 8pm, then after 11pm the client computer can no longer access the internet (until 6am the following morning). No problem there. However, if I switch the router on at, say, 11:30pm, then the client has full access to the internet! So it appears something goes wrong if the router boots during the time that the client must be banned.
I noticed that if I browse to the web control panel, the current time is given at the top of the page. For example, the following is shown:
FREESCO v0.4.1 [ethernet ethernet] Thu Feb 26 12:27:06 WST 2009
System is up since
Thu Feb 26 19:41:00 WST 2009
up 1:46, load average: 0.18, 0.18, 0.08
The current time on the first line was correct, 12:27 WST on 26 Feb, at the time of opening the control panel. But notice the next two lines: "System is up since 19:41 WST on Feb26, up time 1:46". For a start, this is impossible - how can the system be up since a time AFTER the current time today? Further, if the router was booted 1 hour and 46 minutes ago, and the current time is 12:27, then the boot time should be 10:41 WST (not 19:41). Somehow the indicated time of boot is 7 hours ahead of the actual time of booting.
Note that the time zone where I live is GMT +9 hours (Western Australia Standard Time). I do have the time zone file "perth" in my /TMZ directory.
I may be wrong here, but it seems to me this could be the reason why the router is allowing access to the client if it boots during the "banned" time. Maybe it is working on the incorrect time of booting - even though the current time is obviously corrected soon after - presumably by the synchronize function of the http control/time server.
I don't know why the time of booting appears to be incorrect. I did check the current time in the BIOS CMOS memory of the router PC, and that is correct.
Any ideas would be welcomed.
