Don't quote me on the exact syntax (I do know the syntax for iptables):
ipfw add allow tcp from site-a.com to any http;
ipfw add allow tcp from site-b.com to any http;
ipfw add allow tcp from site-c.com to any http;
ipfw add deny ip from any to any;
sleep $HOWEVERLONG;
ipfw flush;
I guess the other way would be simply to do ifconfig up when you need a site and take it down again. I don't tend to use such methods because if I'm really susceptible to distraction something else will distract me anyway. I think that self-discipline could be better (when the urge comes to load twitter, just don't do it).
Comments
ifconfig down; sleep 100000; ifconfig up (add parameters as needed) Does this need an app?
Click a button or type all of that or run a shell script, hmm. I would clicking the pretty buttons.
This app seems to work.
Ok, turn the previous command into a shortcut. Done!
Does your solution support: ifconfig down except (site-a.com, site-b.com, site-c.com, site-d.com, site-e.com)
Don't quote me on the exact syntax (I do know the syntax for iptables):
ipfw add allow tcp from site-a.com to any http; ipfw add allow tcp from site-b.com to any http; ipfw add allow tcp from site-c.com to any http; ipfw add deny ip from any to any; sleep $HOWEVERLONG; ipfw flush;
I guess the other way would be simply to do ifconfig up when you need a site and take it down again. I don't tend to use such methods because if I'm really susceptible to distraction something else will distract me anyway. I think that self-discipline could be better (when the urge comes to load twitter, just don't do it).