Create a server on port <1024 without being root
I made a program that acts as a server, and I would do it through a port rather "small."
Problem: impossible to create a server when I take a relatively small port. And I have a vague recollection of having learned that it was possible to listen on ports less than 1024 only as root
Since the program contains several thousand lines of code that make a lot of things (to write to files selected by the user !!!), and also because I do not want to type my password every time I start, I would like to know if there is not a way to make an "exception" or something along the lines to listen on this port without being root?
thank you in advance,
Re: Create a server on port <1024 without being root
Why especially a port <1024? The range of 1025 to more than 65,000 is not big enough?
Re: Create a server on port <1024 without being root
There are two reasons:
1) that seems more the port is small, the greater the priority (well, I see not how it is possible too, but hey, there may be a "true")
2) I prefer to use a port type 80 for example, because it 99% chance of being always open, even in a rather "filtered".
Knowing that I took this decision after seeing a guy who was in a university room (or something like that ) And who could not use my program.
Re: Create a server on port <1024 without being root
Port 80 and has a great chance of being used by Apache or other software such as Skype ...
However I am also interested in a possible solution.
Re: Create a server on port <1024 without being root
Why not do a NAT with iptables rule that redirects connections to a port X <1024 to another port Y> = 1024?
Re: Create a server on port <1024 without being root
Quote:
Originally Posted by
stinger
Port 80 and has a great chance of being used by Apache or other software such as Skype ...
However I am also interested in a possible solution.
I do not have to use port 80, I can use port FTP, SMTP and more ... And I'm the one who has the server, and I would, of course, a port that I do not already exist.
Quote:
Why not do a NAT with iptables rule that redirects connections to a port X <1024 to another port Y> = 1024?
Yeah, I find the above if I have no other solution.
Because I do not have iptables installed, and I too did not want to install just for this ... (my office is already livebox firewall)
There are no other solutions to add an exception, or even disable this security (unless it poses security problems ).
And if not, there comes an idea: It would not be possible to make a routing rule on the NAT livebox to redirect that enters on port 80 to port 1234 for example? Because I seem to remember that this is possible on the interface I'm trying ... it's night and I would like to see current