|
|||
Limit Bandwidth (not throughput)
Hello,
I am wondering if anyone has any insight as to how you can limit the total bandwidth used by a particular IP/host...etc? I know PF/ALTQ can prioritize and limit the total usuable connection speed but I am looking to do something more like a ratio once you reach X you are cut off. And I suppose in my case with the bandwidth you would be cut off for Y amount of time. Is there any simple way of doing this? I have yet to see any software (knowingly) to do this on OpenBSD. Thanks! P.S. I appologize if PF is able to do this. Please point me to the topic in the man page if doable. |
|
|||
Hello again jggimi,
Interesting. State would not be 100% accurate though right? For example if I were to reboot the system the states logs would be reset to 0 I presume? I would be interested in seeing any example how to implement this none the less though. It would be nice if there were a more exact way of handling this either through another program or if PF/ALTQ were expanded to support it. pass in on.... from $host ... port ... max bps number/days or something. Anyway thank you for your input. |
|
||||
Rebooting a router will obviously kill any state table within it. Even if a future PF development hooked bytes-transferred into stateful tracking, rebooting starts from scratch. As it does today with all of the stateful tracking knobs.
When I had a cron job tracking bytes transferred, it was a simple perl script that used the output from sysutils/pftop. The state table data from pftop are no longer accurate, as it has not caught up with all PF changes. This is why I recommended using pfctl instead -- it can be trusted to stay in sync with PF changes. From memory, the script ran every 5 minutes, looked for inbound ftp control sessions (port 21) that had surpassed a total bytes transferred threshold (300KB). When found, the script would:
|
|
|||
Awesome
Now that you wrote it out it make a little more sense! Haha. I will play around with this idea. Thanks a lot for your input. Good luck with that OBSD patch submission. |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Disk I/O Throughput | m4rc | OpenBSD General | 5 | 10th July 2008 02:50 AM |
limit use memory by Apache | mfaridi | FreeBSD Security | 4 | 8th July 2008 05:59 PM |
Approaching the limit on PV entries | ccc | FreeBSD General | 6 | 14th June 2008 06:58 PM |
bandwidth !!! | sybergod | OpenBSD Security | 1 | 23rd May 2008 09:10 AM |