Seconded. I wrote a little python script [1] that I use for this that additionally disables my network adapters during work time.
This is going to sound incredibly lazy, but I've found that a good way to keep myself off the internet during break periods (which often leads to extended breaks) is to play a game of Civilization. One turn per break and you'll be so absorbed you won't even think about HN or Reddit.
[1] http://sha.ddih.org/2010/09/04/pomodoro-py/ (it's rough but it works for me)