Thank you for posting your query on Microsoft Q&A.
The ports listed in the document you have shared are all ports that are required to be open on the target system / outbound from the AD Connect server i.e port 389 will need to be open on the domain controllers, the Azure AD connect sever will use dynamic ports.
Let me know if this helps, if you have any further queries I would be happy to help :)
Kind Regards,
Donal