I have a project that I wish to try. I call the project N.S.A. N.O. That's Network State Access, Normally Open.
The idea is to have a customized USB hub with a solid state relay in the data lines for it. This relay would be controlled by an Arduino Uno configured to determine if the host computer has network connectivity or not. If there is NO connectivity then the switch is closed and the hub goes live. If there IS connectivity, then the switch is opened and the hub goes dead. Any hard drive attached to this hub as well as any other device(webcam for instance) is only available to the system when there is no web connectivity then. Even that famous 3 letter agency can't hack into a device it simply can't see. But you can still access your files by merely shutting off your wifi.
Is there a way to read the network state via the USB port with an Uno? via a serial command possibly...I'll write a script/driver if needed to feed the info to it.