2

I need to be able to assign specific ports to a given user to listen at. Say I have user X, I want him to be able to only listen on port 500. User Y only on port 501. How can I do this? Im working on a debian lenny.

Edit: User X and Y should not be able to touch any other port, not assigned to them, within a given range. (like port 100-1000)

1
  • 1
    I think you need to provide a lot more background information here.
    – Zoredache
    Sep 28, 2011 at 21:45

1 Answer 1

1

Non root users cannot listen (or even open) ports below 1024.

To restrict users to other single ports above 1024, you can use the --uid-owner option of iptables. See "man iptables".

If you dont want to mess with iptables yourself (but still have a decent knowledge of networking/firewalling), my personal favourite firewalling solution is firehol. It has user/uid commands to help you set up per-user restrictions.

http://firehol.sourceforge.net/

1
  • sorry about the confusion about the ports below 1024. I just picked a bad range. Anyway, I cant assign them a range with iptables/firehol?
    – pharno
    Sep 29, 2011 at 9:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .