Since you try to copy your files to both NAS or iMac. So, I will assume the problem is not on the other side, but either on the Mac, the Cable, or the router (if any).
The chance of the cable has problem is the lowest, so I will check the router and Mac before the cable.
If you have any other router to replace the current one, that will be an easy test. Or at least reset / reboot the router and test it again.
If the problem is on the Mac, since both port has the same problem. It's more like software related. IMO, make a clean install for testing is the best way to confirm if it's software related.