OK.
So BitTorrent is failing because of "a firewall".
If you have a router, you probably have port management on that device that you need to look at. (Admin console)
If you don't have router, your modem may be filling that role and assigning NAT.
Your ISP may be blocking those ports (unlikely).
Are you running this behind a personal network, or a business firewall (at work or at home?)
Mac OS is UNIX (based on Free BSD, I think)...what's your point? IPFilters, or similar? Those are configured using the SysemPreferences?Sharing?Firewall panel.
Have you investigated for any help out at BitTorrent user groups?
Otherwise, I'm not sure what else to try. If you want to get into heavy UNIX firewall configuration, I'm not your guy. sorry...