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.

Alright, well, what I wanted to do was to allow my users to only be allowed to access a specific port,

In example, UserA can only access port 2004 While UserB can only access ports 2009, and 2010

To be more helpful, I'll try and explain. Basically, users will be allowed to remotely access the server, and call a program through SSH. The thing is, the program allows the user to type in the port to use. Is there any way to restrict users to only be able to use certain ports...

I'm assuming I may have to some how modify the program so that a user can only access certain ports (and in turn some how assign the ports to each user), but I'm unaware of how this would be done.

share|improve this question

1 Answer 1

What you basically need is the nufw. Ubuntu's classic default firewall ufw allows just port-based restriction by manipulation of ip-tables. The nufw on the other hand, allows user-based restriction, apart from acting as a classical firewall. Here is the debian link (I'm sure ubuntu repository must also be having this):

http://packages.debian.org/squeeze/nufw

share|improve this answer
    
Yes, there seems to be one for Ubuntu... Though, i'm unaware of how to use it exactly... For example, how would i go about assigning a port to a user? –  Jeremia Aug 7 '12 at 0:04
    
You can find some examples and techniques in NuFW Handbook here: docstoc.com/docs/17302002/NuFW-Handbook –  Prahlad Yeri Aug 7 '12 at 0:18

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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