Do you have your OSX firewall active? See issues about firewalls involving OSX firewall & also modem/router firewalls here
Connection problems? Check here first! (click on link)
Also if you're using OSX 10.4 then you should make sure you're using Java 1.5; see
Setting up Java 1.5