I would like to forbid a user account on linux to use a a given port. So far, without root privileges, a user can't use ports under 1024. Is there a way to limit a user to a given range of ports, let say [2100-2199] ?
Tell me more
×
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.
|
migrated from stackoverflow.com Jul 6 '11 at 13:35
|
I don't know exactly how to configure this, but I think that selinux and grsecurity are able to control this through some ACL like system. Read up on those, particularly selinux, and maybe somebody that knows how to configure them can provide an more detailed pointer. |
|||
|
|
|
From the Shorewall rules documentation iptables has the capability to match users or groups as long as they are on the same machine. You will need to setup the appropriate deny rule(s) for the port range. You may want to install Shorewall to manage your firewall. |
|||
|