Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Mar 2008 13:54:18 +0100
From:      "=?ISO-8859-1?Q?Anders_H=E4ggstr=F6m?=" <hagge.lists@intercorner.net>
To:        freebsd-ipfw@freebsd.org
Subject:   Dummynet/ipfw-rules to limit bandwidth based on IP
Message-ID:  <1a5a68400803070454s2622a5cenc6e37462528c51b@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1a5a68400803070454s2622a5cenc6e37462528c51b>