OSX firewall configuration:
OSX Firewall settings for Tiger
If you're using a router or high speed modem, then please answer the questions listed here if you need help:
System details - help us to help you (click on link)
Otherwise if you think you can sort it out yourself, see tips on modem/router configuration for UPnP or else port forwarding here
Connection problems? Check here first! (click on link)
Keep in mind that most routers & high speed modems, especially wireless devices have internal NAT firewalls. The way to deal with it is to either enable UPnP if it supports it or reliably supports it. Or else forward a port.
BTW if you're connecting from a school/university/college/school residence, then chances are they are externally firewalling you or deliberately blocking p2p programs. Most schools now have this policy in recent years.