Skip to contentSkip to conversation

block network access for certain users/groups

DISCUSSION Elmar Stellnberger 2 participants 2 messages Jul 29, 2010

lore
Share & tools
lore
#0 lore raw

I need to block network access for certain users/groups, fully:

iptables -A mychain -m owner --gid-owner blockedusergroup -j DROP

...drops ping packages in the output chain but lets my user happily connect to localhost:631 or any other http address. In deed the rule above is therefore pretty useless.

I need to block ALL incoming and outgoing packages for a certain user/group. At the moment there is only insufficient blocking for outgoing packages available.

What will I have to do to implement network access restrictions on a per user/group basis? Logging such packages is already possible. Why is blocking them not?
Can anyone help me?

Elmar Stellnberger

#1 lore raw
Quoted 6 lines · Elmar Stellnberger

I need to block network access for certain users/groups, fully:

iptables -A mychain -m owner --gid-owner blockedusergroup -j DROP

Err... I know this is stating the obvious but your output chain does jump to the mychain at some point doesn't it ;)

Also some apps remember do not run with the groupid of the person who launched the application - gid-owner matches the *effective* group id of the process.

--
Richard Horton
Users are like a virus: Each causing a thousand tiny crises until the host finally dies.
http://www.pbase.com/arimus - My online photogallery
http://www.richardhorton.info