iptables

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...


Go Back   Usenet Forums > System Security and Security Related > Linux Security

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 09-09-2005
kenz
 
Posts: n/a
Default iptables

hi,
is anyone know iptables can bind with time like squid to control the
time of surfing ??

tq

Reply With Quote
  #2 (permalink)  
Old 09-09-2005
Keith Keller
 
Posts: n/a
Default Re: iptables

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

Reply With Quote
  #3 (permalink)  
Old 09-09-2005
kenz
 
Posts: n/a
Default Re: iptables

ic..
how come i never think about it..
beside this is that other way to do it ?
tq

Reply With Quote
  #4 (permalink)  
Old 09-09-2005
chabral
 
Posts: n/a
Default Re: iptables


"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


Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 09:45 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0