This is a discussion on iptables within the Linux Security forums, part of the System Security and Security Related category; hi, is anyone know iptables can bind with time like squid to control the time of surfing ?? tq...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
On 2005-09-08, kenz <kenlec@gmail.com> wrote:
> is anyone know iptables can bind with time like squid to control the > time of surfing ?? iptables itself can't, but cron can. Just write two firewall scripts: one to block ''surfing'', one to allow it. Then put into crontab, something like so: # let folks browse starting midnight 0 0 * * * /path/to/firewall.browsingOK # cut off browsing starting 12:01am 1 0 * * * /path/to/firewall.browsingBad --keith -- kkeller-usenet@wombat.san-francisco.ca.us (try just my userid to email me) AOLSFAQ=http://wombat.san-francisco.ca.us/cgi-bin/fom see X- headers for PGP signature information |
|
|||
|
"kenz" <kenlec@gmail.com> escribió en el mensaje news:1126221335.896268.109250@o13g2000cwo.googlegr oups.com... > ic.. > how come i never think about it.. > beside this is that other way to do it ? > tq > You can do it with time based rules. For example: iptables -A INPUT -s eth0 --dport http,https -m time --timestart 12:30 --timestop 13:30 --days Mon,Tue,Wed,Thu,Fri -j ACCEPT Check this article out: http://linuxgazette.net/108/odonovan.html Look for section 6. Time-based Rules with time. Although you may need to patch and compile iptables to enable this functionality.... Good luck, -- chabral |