Basically, most brands that I have seen of NAS generally are a disk with a little extra set of smarts. The configurations vary and you could say that the NAS either has a VERY smart, network-aware controller or it has an ordinary controller and a network-aware microcomputer with a rudimentary operating system. But if you think about network-attached printers, the concept is the same. You don't log in to a network printer, you treat it like a network peer and exchange data with it.
With NAS, you have a disk controller device attached to your network and it responds to protocol-based requests that don't require a direct user login. Connections can be based on encrypted virtual channels for security, but in most cases with the Navy, the devices were inside a firewall-based barrier so outside connections could never get to them. The encrypted versions just encapsulated the user requests and responses to allow data to flow securely and safely.
I have seen smaller versions of NAS in Office Depot and Best Buy. Western Digital and Seagate used to make them in 500 GB, 1 TB, 1.5 TB, and 2 TB sizes the last time I saw them, though that wasn't recent. Basically you install a device driver that does its I/O calls through a network channel and that gets you up and running. So NAS is not necessarily the same as CLOUD storage.
I have not seen versions that recognize whether you are on a LAN or a WAN, but don't claim to have seen every such device.
Having said that, there ARE versions of external NAS disks that DO act like cloud storage on your in-house network. It's all a matter of the protocols that the smart controllers will accept across the network.