views:

22

answers:

1

We have a FreeBSD server. Primary IP is 11.11.11.11. Also there are two additional IPs 22.22.22.22 and 33.33.33.33.

Need to set up a firewall on this server doing the following:

  1. If user downloads from 11.11.11.11, grant him 5Mbit guaranteed bandwidth.

  2. If user downloads from 22.22.22.22 limit download bandwidth to 320Kbit per incoming ip so if one ip is downloading using 10 connections/threads, bandwidth will be 32Kbit.

  3. If user downloads from 33.33.33.33 download bandwidth is not limited. Moreover if all 95Mbit is used it should take bandwidth from users downloading from 22.22.22.22.

+1  A: 

You will need ALTQ, which is a part of Packet Filter (PF). Please take a look at the examples in:

/usr/share/examples/pf/

and nice documentation from OpenBSD website:

http://www.openbsd.org/faq/pf/queueing.html

You will probably find in the examples configuration very similar to your.

Maciej Kucharz

related questions