Firewall rules ambiguous?
The firewall is designed to block incoming connections unless permission is granted (with the exception of certain essential system services and "sharing" services, such as File Sharing and Screen Sharing). The first time you use an application and it requests incoming network access, you will be prompted to allow or disallow. It is then added to the list and your decision is noted.

See OS X: About the application firewall on Apple's support website.