Stop access from internet

What is the best way to allow access from local network but stop all access from internet. Need to isolate iCloud mirror while I sort out some virus malware and ransom. Need to access internet by laptop but prevent any intrusions from out side. Thank in advance.

My approach would be to power it down for the duration.

You could disable cloud access in your settings. Furthermore, you can isolate the nas by adding it to a separate vlan.