xref: /dflybsd-src/share/examples/pf/queue1 (revision 86d7f5d305c6adaa56ff4582ece9859d73106103)
186d7f5d3SJohn Marino# $OpenBSD: queue1,v 1.3 2003/01/20 16:14:23 henning Exp $
286d7f5d3SJohn Marino# $DragonFly: src/share/examples/pf/queue1,v 1.1 2005/12/13 01:58:27 corecode Exp $
386d7f5d3SJohn Marino
486d7f5d3SJohn Marinoext_if = "dc0"
586d7f5d3SJohn Marino
686d7f5d3SJohn Marinoaltq on $ext_if cbq bandwidth 10Mb \
786d7f5d3SJohn Marino    queue { deflt, http, ssh, mail, rsets }
886d7f5d3SJohn Marinoqueue	deflt bandwidth 10% priority 0 cbq(default ecn)
986d7f5d3SJohn Marinoqueue	http bandwidth 1.5Mb priority 3 { http_vhosts, http_cust1 }
1086d7f5d3SJohn Marinoqueue	 http_vhosts bandwidth 40% cbq(borrow red)
1186d7f5d3SJohn Marinoqueue	 http_cust1 bandwidth 0.5Mb
1286d7f5d3SJohn Marinoqueue	mail bandwidth 10% priority 1
1386d7f5d3SJohn Marinoqueue	ssh bandwidth 100Kb priority 7 cbq(borrow)
1486d7f5d3SJohn Marinoqueue	rsets bandwidth 7500b priority 0 cbq(red)
1586d7f5d3SJohn Marino
1686d7f5d3SJohn Marinoblock return in on $ext_if inet all queue rsets
1786d7f5d3SJohn Marinopass in on $ext_if inet proto tcp from any to any port 80 keep state queue http
1886d7f5d3SJohn Marinopass out on $ext_if inet proto tcp from any to any port 22 keep state queue ssh
1986d7f5d3SJohn Marinopass in  on $ext_if inet proto tcp from any to any port 22 keep state queue ssh
2086d7f5d3SJohn Marinopass out on $ext_if inet proto tcp from any to any port 25 keep state queue mail
2186d7f5d3SJohn Marinopass out on $ext_if inet all keep state
2286d7f5d3SJohn Marino
2386d7f5d3SJohn Marino
24