In ordinary conditions it will be using ports 80 and 443.
However, if you’re using UPnP (and I assume you are since if you were doing it manually, you would know because you set them) it could be any number of possible combinations. But you should be able to look in your router to see what ports were assigned to the NAS.
The first time i set up prt forwarding, i mapped port 80 external address to internal address port 80 and same for port 443. Although i was getting port forwading OK form the wd mycloud set uo app, i could not access the NAS outside my network (Cellular and internet).
The second time, i set up prt forwarding, i mapped port 8080 external address to internal address port 80 and same for port 443. Although i was getting port forwading OK form the wd mycloud set uo app, i could not access the NAS outside my network (Cellular and internet).
i am confused about what prevents mycloud app from accessing the NAS from outside my network.
I should have mentioned this in my previous post, my router is Apple airport extreme. This could potentially the problem (due to the lack of configurability).
I finally solved my problem today. The cause was improper port forwarding on my airport extreme router. Port 443 was not forwarded correctly. I believe the wd mycloud apps are using this port to communicate with the device, hence the reason why I could not connect outside my network.