ext_if="tun0" table {172.16.0.0/24, 172.16.1.0/24} set loginterface tun0 scrub in all # altq altq on $ext_if priq bandwidth 700Kb queue { q_pri, q_def } queue q_pri priority 7 queue q_def priority 1 priq(default) # NAT nat on $ext_if from to any -> ($ext_if) # altq pass out on $ext_if proto tcp from $ext_if to any flags S/SA keep state queue (q_def, q_pri) pass in on $ext_if proto tcp from any to $ext_if flags S/SA keep state queue (q_def, q_pri) block in quick log on $ext_if proto tcp from any to ($ext_if) port {21 139 143 445 2000 3306 6000}