Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

How to block all the network traffic from one user? But other users are alive to the network that the blocked user is able to connect to other users who have the permission to the internet.

share|improve this question
2  
I have no idea what "other users are alive to the network that the blocked user is able to connect to other users who have the permission to the internet" means. Could you rephrase? –  Chris Down Dec 21 '13 at 6:21
add comment

marked as duplicate by Gilles, slm, Bernhard, jasonwryan, Renan Dec 22 '13 at 0:35

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

You can block all outgoing network traffic for one user using the iptables owner module:

iptables -A OUTPUT -m owner --uid-owner <username> -j DROP

Note that this will block on all interfaces. If you want to use a specific interface, use -o <interface>.

You could also consider setting up another machine as the gateway to the network, and then requiring users to authenticate to it.

share|improve this answer
add comment

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