Tsilou B. is right. The Mac firewall is off by default. Determine was IP services you want to run, if any, and then turn the firewall on. If you do not need to share files or printers for others then all ports are blocked. If you turn on AFP file sharing then the firewall opens that port. For added fun, click the Advanced button and make sure that Stealth Mode is checked. That way if some miscreate is scanning for unprotected services your computer will not respond.