10

I want to stop being able to access the internet during my working day. Is there any tool that I can use to disable internet connectivity for a specified period of time? I'm using Ubuntu 10.04

3

You can disable your network interfaces

typing "ifconfig" at the command line will print all of your network interfaces.

you can bring down an interface like this

sudo ifconfig eth0 down

where eth0 is the network interface you are disconnecting, such as your wireless or wired Ethernet.

when you are ready to use it again just bring it back up.

sudo ifconfig eth0 up

3
  • Thanks Chandler - what I am trying to do is prevent myself from surfing the web, is there a way to set a time parameter when I do this?
    – williamR
    Jul 27 '10 at 16:15
  • 1
    You could put those two commands in roots crontab at specific times. So lines like "0 8 * * * ifconfig eth0 down" "0 17 * * * ifconfig eth0 up" will turn off the interface at 8am and turn it on at 5pm. You can also specify certain days of the week. See man -s 5 crontab
    – KeithB
    Jul 27 '10 at 18:06
  • A small note: to get the list of network interfaces, ifconfig | grep -P '^\S+' (or nmcli d, if available) can be used instead of plain ifconfig, which dumps the full configuration data.
    – waldyrious
    May 30 '18 at 11:16
1

I use LeechBlock for Firefox at work. Block your biggest time wasters and you'll soon get back to work.

You can still access the rest of the web to do work-related searches (say), so you don't look like a complete nutter to your colleagues if they are at your screen.

0

Self Control (Download Link)

From OMG!Ubuntu!

Self Control allows you to ‘block access to incoming and/or outgoing mail servers and websites’ for a specified amount of time.

Self Control Screenshot

1
-1

I just unplug the network cable when i'm not using the internet. This won't work for wireless connections, but i would reccommend using it if you have a wired connection (probably in addition to software disable).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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