mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-14 10:09:48 +00:00
9d7ccc0ffa
- Add OpenBSD example rulesets as advertised in etc/pf.conf and pf.conf(5) - Tweak the pointer to fit the FreeBSD default location share/examples/pf - Account for the new directory in BSD.usr.dist (no hier(7) change required as share/examples is an opaque item there). Obtained from: OpenBSD Reminded by: Thomas T. Veldhouse PR: docs/71691 MFC after: 2 days
30 lines
1.1 KiB
Plaintext
30 lines
1.1 KiB
Plaintext
# $FreeBSD$
|
|
# $OpenBSD: queue2,v 1.2 2003/01/20 16:14:23 henning Exp $
|
|
# 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
|