Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
How to restrict internet access for a particular user on the lan using iptables in Linux

I have 4 accounts on my computer (I have root access). I want to block off ALL internet access to one of the users. My computer connects to the internet primarily through Wi-Fi. The user should not be able to connect, surf the internet or even use the local network. I found a solution here but I'm not sure that would work for me. (Plus I need something simpler)

I am using Ubuntu 10.04

How do I do this without much tweaking? (Basically, I want a quick and simple solution)

I tried reading about Iptables but its beyond my knowledge.

share|improve this question

marked as duplicate by Gilles, Michael Mrozek Feb 6 '12 at 5:42

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

I had included that link in my question but IPTables looks too confusing to use. Aah well, If there is nothing else I can use. – user14517 Feb 3 '12 at 5:11
Iptables really is the best job for this. A single iptables command does it. All you have to do is change that --uid-owner value to match the user you want to block and youre done. Wanting something simpler doesnt make the answer wrong (plus, you dont get much simpler than that). – Patrick Feb 6 '12 at 5:12
I just hoped for a nice GUI. But considering that isn't available/possible, I think iptables is a compromise. – user14517 Feb 6 '12 at 12:48
up vote -1 down vote accepted

If you have iptables and connlimit installed you can limit incomming connections for a certain range or a single ip:

 iptables -I FORWARD -p ! tcp -m iprange --src-range -m connlimit --connlimit-above 50 -j REJECT

This can reject incomming connections above 50 open sockets for ip x.x.x.100 to x.x.x.102. I'm not sure if you can change the value to reject all incomming connections. I use this basically to throttle download for a single ip.

share|improve this answer

If you install one of the parental controls apps e.g. Nanny you can restrict the amount of time a user has access to the Internet to zero/never. There are other parental controls apps, don't have one in particular to recommend but this should give you the level of control you want, with the simplicity of a GUI app.

share|improve this answer
Nanny doesn't work. I tried giving the user 0 time on web browser, internet messaging and stuff. I rebooted and 5 mins later, that user was gladly surfing rage comics. – user14517 Feb 3 '12 at 5:12