vsftpd dynamic bandwidth throttle?
I've got vsftpd all set up and it works great, though I've got one minor issue:
I'm on the net via ADSL, and with no bandwidth throttle set in vsftpd.conf anyone downloading from my site completely hogs my outgoing bandwidth, affecting my ability to surf web sites, etc.
I've tried setting anon_max_rate in vsftpd.conf and can indeed limit the outgoing bandwidth used, but then my users complain of slow downloads speeds...
So what I'm trying to achieve is a way to dynamically throttle the bandwidth - ie. I'd like to be able to vary the anon_max_rate value depending on certain conditions.
I'm thinking of a script run from cron every minute which will vary the throttle depending on whether it can ping any of my other local machines; ie. if nothing else is powered on, then turn up the bandwidth allowed for vsftpd, when the other machines are ping'able then lower the throttle.
The script itself is almost trivial, except for the part where I change the throttle... obviously I could have 2 different vsftpd.conf files, one with hi and one with low anon_max_rate, and swap them over when I need to change the throttle, but I assume I'd need to restart xinetd each time - and that'd probably cause too much disruption to other network services...
Does anyone have an ideas?
Thanks in advance!