plan to add time-range in ipfw,pf?

I have question!
In iptable ( linux ) they may be load many file ( conf ) in one time!
And pf or ipfw may be load multi file ( conf ) in one time???
Because i want to make traffic shaper internet according to time.
thank you very much!
 
Setup a cronjob to load a different pf.conf file at a certain time.
 
if i have 3 Computer : A ,B ,C
i must to make plan :
in day
computer A ( pf.confA for A)
10-12 speed 1 mb
12-24 speed 2 mb
computer B ( pf.confB for B)
2-14 speed 3 mb
14-24 speed 4 mb
computer C ( pf.confC for C)
3-15 speed 3 mb
15-24 speed 1 mb
how i can crontab for pf.conf?Because one time pf only load 1 file conf ?????
 
congavangkiev said:
computer A ( pf.confA for A)
10-12 speed 1 mb
12-24 speed 2 mb

you should have multiple pf.conf files for each computer. e.g:
pf-1mb.conf and pf-2mb.conf. -1mb is set up to limit speed to 1 mb, and -2mb to 2 mb. And maybe just a pf-unlimited.

Then you can configure cron with something like:
Code:
0 10 * * * pfctl -f /etc/pf-1mb.conf
0 12 * * * pfctl -f /etc/pf-2mb.conf
0 0 * * * pfctl -f /etc/pf-unlimited.conf

You would also need some magic to set the correct one at boot!
 
Back
Top