Dummynet/ipfw-rules to limit bandwidth based on IP
Anders Häggström
hagge.lists at intercorner.net
Fri Mar 7 13:22:12 UTC 2008
Hello list!
I have tried to solve this configuration-issue for a time now but
without success, so I'm asking if anyone can help me with an
example-ruleset or point me to some good documentation that describe
this type of setup.
My scenario is a webserver at 10MBit/s with httpd-service, ftp-serivce
and ssh-service and I want to limit the bandwidth to 1MBit/s inbound
and 1MBit/s outbound per IP-address that is connected no matter what
service/port they use and no matter how many connections that IP has
occupied so that one visitor/user does not eat up all my bandwidth if
he/she has more bandwidth availible than my server.
An example is that "user1" connects to three different websites hosted
on my webserver and download one relese-image (large file, outbound)
and "user2" is uploading a file by ftp to the server (large file,
inbound) and "user3" is downloading a large file by ftp (outbound) and
at the same time uploading another large file by scp/ssh (inbound). In
my scenario the three users will load my server with a maximum of
1Mbit/s each per direction. In this example a total of 2MBit/s inbound
and a total of 2MBit/s outbound even if some of the users have
100MBit/s availible at there ISP.
Thanks in advance!
Anders
More information about the freebsd-ipfw
mailing list