Sample pf script for FreeBSD. This is what i used and it worked for me. WMMV

#! /bin/sh

/sbin/ipfw -f flush

# Block an IP address from connecting to external hosts/servers
/sbin/ipfw add deny tcp from 192.168.1.57 to any 

# Redirect port all http traffic to a local proxy server
/sbin/ipfw add fwd [ip.address.of.proxy],3128 tcp from any to any 80

# IPNAT
/sbin/ipfw add divert natd all from any to any via dc0 

# Some traffic shapping
ipfw add pipe 2 ip from any to 192.168.1.101
ipfw pipe 2 config bw 33Kbit/s

ipfw add pipe 3 ip from any to 192.168.1.102
ipfw pipe 3 config bw 512Kbit/s

/sbin/ipfw add pass all from any to any