You are not logged in.
This is probably a question with a really simple solution, but for all my searching I'm not finding it. (Not coming up with the right key words?)
I'd like to have my computer automatically shut down the network between certain times of the day (an effort to be more productive). The computer needs to be useable still for some things, but would deny web browsing etc. except for perhaps a small whitelist. Configuring the router is not an option, as it needs to be only one specific computer on the home network.
Is there a software way to configure such a setup?
Offline
Block all traffic between 3:00pm and 9:00pm:
iptables -I OUTPUT -m time --timestart 15:00 --timestop 21:00 -j REJECT
Block all HTTP traffic between 10:00am and 12:00pm:
iptables -I OUTPUT -p tcp --dport 80 -m time --timestart 10:00 --timestop 12:00 -j REJECT
Block all HTTP, HTTPS and FTP traffic between 11:00am and 2:00pm on weekdays only:
iptables -I OUTPUT -p tcp -m multiport --dports 80,443,21 -m time --timestart 11:00 --timestop 14:00 --weekdays Mon,Tue,Wed,Thu,Fri -j REJECT
Block all traffic on weekends:
iptables -I OUTPUT -m time --weekdays Sa,Su -j REJECT
To add exceptions, put some rules above this to explicitly allow. Example, to allow access to the Arch Forums:
iptables -I OUTPUT -d 66.211.214.131 -j ACCEPT
Last edited by fukawi2 (2009-09-30 12:05:57)
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline