Looking to block all network traffic anytime I am away from the computer. I tried putting the iMac to sleep every time I step away and changed the sleep mode to hibernation as well changed energy saving settings to disable network traffic and Wake on LAN, and Powernap is disabled, but my router reports that my iMac still is doing network communication after I put it to sleep.
I am looking to prevent this.
Any script I can run when I lock the computer?
[EDIT]
It seems I can run this command as a script:
/usr/libexec/ApplicationFirewall/socketfilterfw --setblockall on
The problem is it won't work unless I sudo
it, and I don't want to have to put in a password every time I lock the screen so this script runs.
Is there any way around this short of removing the need to provide a password to sudo?