View previous topic :: View next topic |
Author |
Message |
Dreadfull2 n00b
Joined: 28 Jun 2006 Posts: 60
|
Posted: Tue Jul 25, 2006 7:33 am Post subject: Dinamic limiting with HTB ? |
|
|
hi, i am using htb to limit bandwidth to clients for almost 1 year and i would like to start doing this dinamic, not by ports as i did till now but by source (download)/destination (upload)
in my mind a possibe way is setting up a script to check the source and destination on every new connection (don't have so many clients to blow my server not to say it's not a slow one)
something like
have one file with the ip classes and check it with cat and grep
cat $file | grep $ip (of course i'll need to modify so if $ip = xxx.xxx.xxx.xxx it will be changed to xxx.xxx.xxx.0 so it will match the class i have in $file (wich could be xxx.xxx.xxx.0/24 or /25 and so on)..)
then apply a specified MARK with HTB depending on the source/destination
any ideas ? i would manage to create such a script but i don't have any idea how to START a script when a new connection is established ... don't even know if it's possible thought _________________ AMD Athlon 64 3200+
2x1 GB DDR
2x200 GB WDC SATA
----
curently owning 5 routers all on gentoo
---- |
|
Back to top |
|
|
Dreadfull2 n00b
Joined: 28 Jun 2006 Posts: 60
|
Posted: Tue Jul 25, 2006 8:28 am Post subject: |
|
|
ah .. on my 2nd rethink i have come to the conclusion that i don't need to make it dinamic, just set the specific rules and it will work (thought i didn't want to make my firewall contain 600 lines but heh) _________________ AMD Athlon 64 3200+
2x1 GB DDR
2x200 GB WDC SATA
----
curently owning 5 routers all on gentoo
---- |
|
Back to top |
|
|
|