bandwidth control

ahmettaha

Registered
Im trying to put a bandwitdth limit to my carracho server. I have made pipes for the ports but i couldnt configure them. so the connection still uses my whole bandwitdh. what I tried to do was to limit the output bandwidth to 15 kbytes/s

add 00100 pipe 1 tcp from $(host) to any 6700 via en0 out
add 00200 pipe 2 tcp from $(host) to any 6701 via en0 out
pipe 1 config bw 15KByte/s
pipe 2 config bw 15KByte/s
add 65535 allow ip from any to any


I couldnt make the ipfw to accept line 3 and 4. it gives me some errors about dummynet. How do I do it?
 
I'm surprised you got rule 1 and 2 through - I don't see any mention at all of 'pipe' in the ipfw man page.

btw, you might want to make that last rule
add 65535 deny ip from any to any
if security means a lot to you...
 
the problem is I can not use dummynet. I created the pipes bt I cannot configure them. it gives me his error

ipfw: setsockopt(IP_DUMMYNET_CONFIGURE): Protocol not available
 
From the dummynet homepage, it looks like dummynet has to be compiled into the OS kernel. And from the error you got, it looks like it's not in the Darwin kernel - not surprising, it looks like it's only available in FreeBSD and in a PicoBSD floppy right now.

Have you got an old PC you could boot off the PicoBSd floppy? I know, having a dedicated firewall is a lot of overhead, and possibly not worth the bother - although an old 386 with 4 mb ram, two nics and no hd would probably almost be overkill for the job.

What about using Carracho itself? If I recall (long while since I used it) there is a spot where you can specify what sort of connection you have - have you tried stating that you've got a much slower connection than you really have? Maybe that really does throttle bandwidth somewhat by setting the TCP window size. Might be worth checking out, anyhow...
 
Any luck figuring this out? I would like to figure out a way to limit the amount of bandwidth that apache uses on my system. My roomates complain when someone downloads one of my movies while they're playing games :rolleyes:
 
Search in versiontracker for an app called CarraFix, I think that'll do what you want (it acts as a front end to ipfw)..
 
Back
Top