Ask HN: How do I automatically turn Internet off on mc os x?
2 comments
http://atmac.org/freedom-turn-off-the-internet-and-get-some-...
Freedom does this, apparently pretty well. Not CLI, though, apparently.
Freedom does this, apparently pretty well. Not CLI, though, apparently.
turn the router off, or get one of those timer switches for $5
or put this in /etc/crontab
It checks every minute so you still have a window :)
It checks every minute so you still have a window :)
*/1 0 * * * root ifconfig en0 down
*/1 1 * * * root ifconfig en0 down
*/1 2 * * * root ifconfig en0 down
*/1 3 * * * root ifconfig en0 down
*/1 4 * * * root ifconfig en0 down
*/1 5 * * * root ifconfig en0 down
*/1 6 * * * root ifconfig en0 down
*/1 7 * * * root ifconfig en0 down
*/1 8 * * * root ifconfig en0 down
*/1 9 * * * root ifconfig en0 up
*/1 10 * * * root ifconfig en0 up
*/1 11 * * * root ifconfig en0 up
*/1 12 * * * root ifconfig en0 up
*/1 13 * * * root ifconfig en0 up
*/1 14 * * * root ifconfig en0 up
*/1 15 * * * root ifconfig en0 up
*/1 16 * * * root ifconfig en0 up
*/1 17 * * * root ifconfig en0 up
*/1 18 * * * root ifconfig en0 up
*/1 19 * * * root ifconfig en0 up
*/1 20 * * * root ifconfig en0 down
*/1 21 * * * root ifconfig en0 down
*/1 22 * * * root ifconfig en0 down
*/1 23 * * * root ifconfig en0 downThanks, I will probably use this as I don't want to limit access for other computers.
check that your interface is actually en0 by typing : ifconfig
of course you'll also lose all network, not just the internet
I suppose the other way is changing /etc/resolv.conf from
of course you'll also lose all network, not just the internet
I suppose the other way is changing /etc/resolv.conf from
nameserver 8.8.8.8
to nameserver 127.0.0.1
8.8.8.8 is google's speedy dns
[1] http://freestylemind.com/productivity-experiment-internet-diet