Add pf example configs
[dragonfly.git] / share / examples / pf / queue2
CommitLineData
339d8303
SS
1# $OpenBSD: queue2,v 1.3 2005/07/02 16:21:00 joel Exp $
2# $DragonFly: src/share/examples/pf/queue2,v 1.1 2005/12/13 01:58:27 corecode Exp $
3# advanced queue example.
4# give interactive ssh traffic priority over ssh bulk transfers (scp, sftp)
5
6ext_if="dc0"
7developerhosts="192.168.2.0/24"
8employeehosts="192.168.0.0/23"
9
10altq on $ext_if cbq bandwidth 5Mb queue { std, http, mail, ssh }
11
12queue std bandwidth 10% cbq(default)
13queue http bandwidth 60% priority 2 cbq(borrow red) { employees, developers }
14queue developers bandwidth 75% cbq(borrow)
15queue employees bandwidth 15%
16queue mail bandwidth 10% priority 0 cbq(borrow ecn)
17queue ssh bandwidth 20% cbq(borrow) { ssh_interactive, ssh_bulk }
18queue ssh_interactive bandwidth 25% priority 7
19queue ssh_bulk bandwidth 75% priority 0
20
21block return out on $ext_if inet all queue std
22pass out on $ext_if inet proto tcp from $developerhosts to any port 80 \
23 keep state queue developers
24pass out on $ext_if inet proto tcp from $employeehosts to any port 80 \
25 keep state queue employees
26pass out on $ext_if inet proto tcp from any to any port 22 \
27 keep state queue(ssh_bulk, ssh_interactive)
28pass out on $ext_if inet proto tcp from any to any port 25 \
29 keep state queue mail