ext_if="ndis0" int_if="ed0" internal_net="192.168.0.0/24" external_addr="193.188.192.15" #table { 10.0.0.0/8, !10.1.0.0/16, 192.168.0.0/24, 192.168.1.18 } #set skip on lo0 scrub in all # Queueing: rule-based bandwidth control. #altq on $ext_if bandwidth 2Mb cbq queue { dflt, developers, marketing } #queue dflt bandwidth 5% cbq(default) #queue developers bandwidth 80% #queue marketing bandwidth 15% nat on $ext_if from $int_if:network to any -> ($ext_if) rdr on $ext_if proto tcp from any to any port 8080 -> 192.168.0.2 port 8080 pass quick on lo0 block in log all antispoof quick for $int_if inet pass in on $ext_if proto tcp from any to $ext_if port 80 keep state pass in on $ext_if proto tcp from any to $ext_if port 8080 keep state #pass out on $ext_if proto { tcp, udp } all keep state pass out on $ext_if proto tcp all modulate state flags S/SA pass out on $ext_if proto { udp, icmp } all keep state pass in on $int_if all # assign packets to a queue. #pass out on $ext_if from 192.168.0.0/24 to any keep state queue developers #pass out on $ext_if from 192.168.1.0/24 to any keep state queue marketin