I would like to have an application that blocks access to some websites like Facebook and Quora for some time of the day (e.g. 9am - 6pm) for certain days (monday - friday). This "blocking" does not have to be super secure. It is only for me to notice that I should not go there.


  • It has to be either an application in a repository (for Linux Mint 16 Petra, but every Ubuntu repository is ok). If there is no native application - a Google Chrome plugin that is in the Chrome Webstore would be somehow ok, too.
  • It has to be
  • It has to provide the possibility to add custom websites / times / days.

No solutions

Host file

On Linux systems there is /etc/hosts. You can block websites with that file for one computer.

However, I don't want to create multiple CRON jobs for that task. So the hosts file is not a solution for me.

Network-based solutions

I can only install something on my computer. It has to work on it, not on something else in the network.

  • 2
    This is something that would normally be done by a router/proxy as a network-wide policy, but I imagine for an individual computer you can create two versions of the hosts file - add your "websites to block" to it, and have a cron job swap one with the correct one when needed. Aug 19, 2014 at 14:19
  • @user2813274 Yes, I know that you can get it to work with the hosts file + Cron jobs. But I want a simpler solution. I think I have seen something like this (e.g. for "parent control") before, but I don't remember the name. Aug 19, 2014 at 14:28
  • 2
    by "simpler solution" do you mean a GUI? because to me cron + cp is just about as simple as you can get.. P.S. the hosts file exists on other platforms as well Aug 19, 2014 at 14:30
  • 1
    @user2813274 Yes, a (good) GUI would make it much simpler. I have about 20 different sites and at least 4 different "time frames". So I would need at least 4 CRON jobs. Aug 19, 2014 at 14:33

4 Answers 4


If you like you can use a Firefox extension called LeechBlock

LeechBlock is a simple productivity tool designed to block those time-wasting sites that can suck the life out of your working day. All you need to do is specify which sites to block and when to block them.

You can specify up to six sets of sites to block, with different times and days for each set. You can block sites within fixed time periods (e.g., between 9am and 5pm), after a time limit (e.g., 10 minutes in every hour), or with a combination of time periods and time limit (e.g., 10 minutes in every hour between 9am and 5pm). You can also set a password for access to the extension options, just to slow you down in moments of weakness!

enter image description here


StayFocusd is a Chrome extension that increases your productivity by limiting the time spent on websites in your custom list.

Features (based on your restrictions):

  • Chrome plugin
  • gratis with (optional donations)
  • Ability to customize websites, hours, and days of the week

enter image description here

enter image description here

Additionally, you can limit yourself to a certain number of minutes per day on your list of blocked website, e.g. 10 minutes before they are blocked. Alternatively, you can "Nuke" a set of websites and block them for a certain number of hours.

  • Can you set the active days/hours for each listed website separately?
    – unor
    Aug 19, 2014 at 15:53
  • 1
    @unor The settings are global for all the websites on the blocked list
    – Tymric
    Aug 19, 2014 at 15:55

"I can only install something on my computer. It has to work on it, not on something else in the network". Do you have access to the router? Normally it will have a web interface, but do you have a password for it? If so, that is the natural point at which to do it

Failing that, look at Nanny for Chrome

Chrome Nanny is a Chrome extension which can keep your browsing habits in check. Do you spend more time on facebook than on work ? Do you spend time more time in Google Reader or Digg or Hacker News or youtube watching kittens and later wished you had not spent as much time ? Do you want to know how much you spent on Flickr ? If so , Chrome Nanny is for you.

Chrome Nanny allows you to block URLs at certain times in a day or limit to certain number of minutes or both . So you can block facebook from 9AM-5PM or to a maximum of 60 minutes a day or both. You can also group URLs to be blocked into block sets. Unlike Leech Block, you can have as many blocksets as you want. You can use regular expressions to specify the site you want to block. This means you can block any URL with the word "kitten" in it. (See FAQ for details).

enter image description here


Focal Filter is a good software. You can block as many websites as you wish for given periods of time in it. You can save the list of websites to block for once and each day you just have to set the time up to which the websites should be blocked.

Since Focal Filter is a Windows application, you have to install Wine first in your Ubuntu and then you have to install Focal Filter using Wine.

  • 3
    An app running in Wine can't interfere with the host system's network connections which is necessary for blocking websites, so your solution won't work.
    – user111
    Aug 20, 2014 at 12:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.