The first place a customer should check is Office 365 Deployment Guide - http://www.microsoft.com/download/en/details.aspx?id=26509. Specifically there is a section on Required Ports; however the direction of the ports are not specified.
Here is some additional information that will assist you with your Lync Online configuration:
- http://community.office365.com/en-us/w/lync/ensuring-your-network-works-with-lync-online.aspx – good article.
- http://support.microsoft.com/kb/2409256 – good article.
- http://technet.microsoft.com/en-us/library/gg425882.aspx - Additionally, even though this is for Lync on-premise when working with external users, it is really the same concept when you think about. Your company/organization is an external user connecting to a Lync service which happens to be available through the Office 365 cloud.