summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2002-12-13 22:31:34 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2002-12-13 22:31:34 +0000
commit434dc41c93bed4ddea7ffab80f95ca65916465fa (patch)
treede0ac0023615d33f8b76e88c20f20a3e0b12e482 /share
parent739b41531ef377fb0871afab5a9c76698a99cc9a (diff)
a more advanced example for queues
Diffstat (limited to 'share')
-rw-r--r--share/pf/queue227
1 files changed, 27 insertions, 0 deletions
diff --git a/share/pf/queue2 b/share/pf/queue2
new file mode 100644
index 00000000000..46b297f72fe
--- /dev/null
+++ b/share/pf/queue2
@@ -0,0 +1,27 @@
+# advanced queue example.
+# give interactive ssh traffic priority over ssh bulk transfers (scp, sftp)
+
+ext_if="dc0"
+developerhosts="192.168.2.0/24"
+employeehosts="192.168.0.0/23"
+
+altq on $ext_if cbq bandwidth 5Mb queue { std, http, mail, ssh }
+
+queue std bandwidth 10% cbq(default)
+queue http bandwidth 60% priority 2 cbq(borrow red) { employees, developers }
+queue developers bandwidth 75% cbq(borrow)
+queue employees bandwidth 15%
+queue mail bandwidth 10% priority 0 cbq(borrow ecn)
+queue ssh bandwidth 20% cbq(borrow) { ssh_interactive, ssh_bulk }
+queue ssh_interactive priority 7
+queue ssh_bulk priority 0
+
+block return out on $ext_if inet all queue std
+pass out on $ext_if inet proto tcp from $developerhosts to any port 80 \
+ keep state queue developers
+pass out on $ext_if inet proto tcp from $employeehosts to any port 80 \
+ keep state queue employees
+pass out on $ext_if inet proto tcp from any to any port 22 \
+ keep state queue(ssh_bulk, ssh_interactive)
+pass out on $ext_if inet proto tcp from any to any port 25 \
+ keep state queue mail