Quote:
|
Originally Posted by Delryn
At this point what I need help with is:
determining if there are any internet accessing programs currently running, I presume the info has to coaxed out of ifconfig?
|
The lsof command lists open files on Linux systems. This includes IP connections (as everything in Unix is a file, yada yada). To list all open network connections:
To restrict this to external addresses (-n to remove hostnames):
lsof -i -n | egrep -v '\->(10\.|192\.168\.|127\.0\.0\.1)'
Well, you get the idea.
If you haven't thought of it already, the Linux firewall (iptables) is a good tool to use if you want to restrict network access in some fashion (either incoming, or outgoing). One could have a cron job that stops network access at X time, and another that enables it at Y.
Quote:
|
Originally Posted by Delryn
how can I take the current time and tell if it falls within the restricted (7days a week) or the school (5days/week)
|
Might have to use a smidgen of Perl or Python for this, unless anyone knows any CLI commands that can do this. Why do you need this functionality, though? Isn't it just a case of enabling access at a certain time, and disabling it at another?