Is it possible to permanently disable internet access under Ubuntu?

3

I have to find a way to finish a horribly boring thesis and I'm a huge procrastinator and easily distracted. A very useful trick was going to the library with an old laptop of mine with Ubuntu 11.04, where I removed the "network-manager" and "network-manager-gnome" packages to disable the internet connection.

Unfortunately I figured out a quick way to reinstall them and now the "magic" is gone. So my question is: Do you know any other way to completely remove the ability to connect to the internet under Ubuntu 11.04? Perhaps by blocking the ability to install new packages?

Since this is in a way a fight against myself, solutions that deal with permissions etc. won't really work, since I know the su password :) I would really appreciate any help!

Elip

Posted 2011-07-03T20:21:45.150

Reputation: 43

https://superuser.com/questions/684005/how-does-one-permanently-disable-gnu-linux-networking – Ciro Santilli 新疆改造中心法轮功六四事件 – 2017-09-30T06:34:51.213

3I... think we don't really got a technical issue here... :) – None – 2011-07-03T20:24:30.147

1Remove the wireless card from the computer (that's still a separate piece, right?) and give it to whomever you'll be turning your thesis in to, with strict instructions not to return it until you show up with your paper. – jwodder – 2011-07-03T20:42:33.853

In most modern laptops; they're not removable. If the OP is running Ubuntu 11.04, it can be assumed that it's a "modern" computer. – bbosak – 2011-07-03T20:44:28.297

Remove network cards and cables, put superglue all over any of the plugs or sockets to prevent cards or cables being reinserted, stop posting inane and useless questions and get on with your work! – Mokubai – 2011-07-03T21:56:21.907

1The "know the su password" can be easily fixed by asking a friend to change it and tell it to you when you finish your important stuff. But frankly, you have to finish some stuff, you have a certain amount of time for that, it doesn't seem to be too big (since you're on SU asking for help) and you even want to waste a part of that precious time for creating artificial limitations for yourself instead of using it to finish writing that boring thesis? Now that's funny, just be a man and write it instead. Or just be a man, don't write it and accept the consequences. This is a valid option too. – vtest – 2011-07-04T02:45:53.137

Answers

2

While I agree with everyone that this is really a pretty non technical question, I thought I would throw in my two cents anyways. Depending how much effort you really want to go to in order to do this and how recoverable you want it to be, the quickest and easiest to recover mode I can think of is run the following command

sudo iptables -I INPUT 1 -j DROP

If you want to get a little more serious, about it and much harder to fix, find your kernel modules for each NIC or just the NIC's you want to disable and delete them then either rmmod them or reboot the system. You can find the name name of the module by running

ethtool -l eth0

and replacing eth0 with all the NIC's you don't want active. Then to find the kernel modules, let's say in your case your find the driver is e1000e, then run

find /lib/modules/ -iname e1000e | grep '\/kernel\/drivers\/net\/'

That should give you a pretty good view of where the drivers are from there you can delete them if you want though to recover you would need to copy them back from either a package or another backup you made and put them back to where they should be. If for some reason I wanted to disable my NIC in a way that would make sure I couldn't enable it while I was out then I would copy them to a USB fob and leave the fob at home.

Anyways, this is all hypothetical. If you really want to make sure you don't use the net when you shouldn't then you will need to learn to exercise self restraint and personal discipline.

P.S.: If you want to make sure the laptop doesn't access the net again, open it up. If it is a laptop with a WiFi NIC in a mini PCI port then pop it out and throw it away. If it uses an onboard chip for WiFi that is a dedicated chip / it isn't part of the North bridge or South bridge and doesn't provide any other functionality then WiFi then de-solder it and throw it away. If it has WiFi built into a shared chip set then either see if you can disable it in BIOS and have someone else set a BIOS administrator password so you can't change it or just sell the computer and buy one that doesn't have integrated WiFi then go buy some self help books on Getting Things Done and other motivation guides for accomplishing tasks.

jetole

Posted 2011-07-03T20:21:45.150

Reputation: 569

2

Instead of trying to find technical ways to sabotage your own computer's Internet access, maybe you should try to stop procrastinating. First; stop posting here with questions that don't belong (which you'll find will already save you some time), second; stop fighting yourself. It won't work. Just work on your paper and try to restrain yourself from clicking a a browser icon until it's done. If that STILL doesn't work, create a new user account WITHOUT admin privileges and DELETE your admin (root) account. That should stop you from getting online, and prevent you from installing any new packages until you find an Ubuntu install disk, boot off of that, then start procrastinating again.

bbosak

Posted 2011-07-03T20:21:45.150

Reputation: 360

I'm not sure one can delete an account which is currently logged in. But on Ubuntu one could remove the sudo rights for the normal user (and the root user has no password anyway). Nice idea. – Paŭlo Ebermann – 2011-07-03T21:14:17.523

It used to work in the older versions of Ubuntu, and if you deleted the last sudoer account on the system, it would be difficult to get access to root privileges (with the exception of recovery mode). – bbosak – 2011-07-03T21:25:22.713

1

Does your laptop have a removable modem/lan modal? If so, remove it and leave it at home. But I suspect you'll always be able to find other ways to waste time, so getting a backbone is probably the best solution.

Roger Swanson

Posted 2011-07-03T20:21:45.150

Reputation: 11

1

Create another user on your system. Try sudo with that user, if the user can sudo you need to remove the user from the admin group to disable that user from running sudo.

Once you've done that, you need to stop yourself from using your regular sudo-enabled account when at the library. So change your password to a long complex one that you can't memorize. Find a large book that you're not likely to carry with you, pick a page, and string together the first letter of each line reading down the page to build your password. Write down the page number, but not the long password.

As long as you leave the book behind, you'll be stuck with the lower-privileged user when you're at the library and won't be able to sudo until you go back home and look in the book.

Mike Rowave

Posted 2011-07-03T20:21:45.150

Reputation: 1 835

Until he downloads an Ubuntu ISO and bypasses the computer's built-in security altogether. – bbosak – 2011-07-04T04:31:15.117

0

Let the system automatically log you in and set a password with copy & paste, after you have removed the network manager. If you can't remember the password you are not able to install anything. As long as you have no rescue cd at hand you have successfully destroyed your internet. You could even copy the password in a file and remove the right to read it. Thus you can use a rescue cd later on to get back the access to your system.

Darokthar

Posted 2011-07-03T20:21:45.150

Reputation: 1 361