How do I use ipfw to allow LAN access but deny Internet access?

How can I use ipfw (or another tool, if one is available) to allow unlimited access between computers on my LAN, but not allow access to the Internet?

(The IPs on my local LAN are 192.168.0.xxx)


Has been a while since I've used ipfw but running the following commands on all relevant computers should do the trick:

 sudo ipfw -f flush
 sudo ipfw add allow tcp from me to 192.168.0.0/24
 sudo ipfw add allow ip from me to 192.168.0.0/24
 sudo ipfw add deny tcp from me to any
 sudo ipfw add deny ip from me to any

To disable just run sudo ipfw flush again