Actually, the built-in firewall of OSX is quite powerful. The problem is that Apple's interface to it is very poor; you can't use it to configure most of the stuff that it allows. You might consider one of the third-party configuration utilities, such as BrickHouse, which use the built-in firewall code but do a much better job of configuring it to do what you want.