Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

This question already has an answer here:

I want my daughter to have free use of the computer under her own user account, but never to have access to the internet. How do I set that up? I can only really use ubuntu as a windows user - I have no expertise at all.

share|improve this question

marked as duplicate by user68186, AgentCool, Uri Herrera, Seth, Basharat Sialvi May 20 '13 at 18:10

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.

1 Answer 1

You can use iptables's owner extension to block a user from accessing the net. Open a Terminal by pressing Ctrl+Alt+T and enter:

sudo iptables -A OUTPUT -m owner --uid-owner user_you_want_to_block -j REJECT

Replace user_you_want_to_block with the actual user ID of your daughter. As long she does not have administrative privileges, that is, can't use sudo she won't be able to reverse the change.

See How to restrict user's access to the internet for time intervals?

This solution will work until you reboot the computer. Once restarted you will have to issue the command again as the administrator. There are various ways of automating this described in detail at Ubuntu iptables help.

Hope this helps

share|improve this answer
1  
Since the OP is not knowledgeable about iptables and startup scripts, it would be nice if you showed him how to do it. Perhaps you could also mention how to get the user id of her account. –  Vreality May 20 '13 at 16:34
1  
OR this can be considered a fantastic opportunity for the user to expand his knowledge by researching a new and interesting topic based on the guidelines in the answer :-) –  hmayag May 20 '13 at 17:33
    
@Vreality: Indeed I would have provided a more detailed answer had a similar question been not answered before. The issue of startup script is a bit complicated as it depends on the type of internet connection and the script has to be executed when the connection is up, not when the admin (OP) logs in. As for getting the user ID, I surely hope the OP knows it. How to find the user ID of various users of a computer is outside the scope of this question. –  user68186 May 20 '13 at 18:28

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