From: "Mikael Ståldal" <mikael.staldal-ingen-reklam@univits.com>
To: linux-kernel@vger.kernel.org
Subject: Possibility to adjust the only-root-can-bind-to-port-under-1024 limit
Date: Tue, 20 Nov 2007 11:14:59 +0100 [thread overview]
Message-ID: <4742B3A3.2050103@univits.com> (raw)
In Linux you have to be root in order to listen to TCP or UDP ports below 1024 (the
well-known ports). As far as I know, this limit is hardcoded in the kernel.
In some cases, this limit do more harm than good, so it would be nice to be able to adjust it.
FreeBSD have a pair of sysctl parameters allowing you to adjust (or effectively remove) this
limit, net.inet.ip.portrange.reservedlow and net.inet.ip.portrange.reservedhigh. It would
be nice if something similar to net.inet.ip.portrange.reservedhigh was implemented in Linux
(with default value 1023).
I have no patch for this, since I have never done any kernel hacking before. But it seems
like it should be easy to implement by replacing the PROT_SOCK constant with
net.inet.ip.portrange.reservedhigh + 1.
(See my blog post for a more elaborate discussion about this:
http://www.staldal.nu/tech/2007/10/31/why-can-only-root-listen-to-ports-below-1024/)
/Mikael
next reply other threads:[~2007-11-20 10:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-20 10:14 Mikael Ståldal [this message]
2007-11-20 14:53 ` Possibility to adjust the only-root-can-bind-to-port-under-1024 limit Radoslaw Szkodzinski
[not found] ` <474306BF.4010207@univits.com>
2007-11-20 19:23 ` Radoslaw Szkodzinski
2007-11-26 9:52 ` Mikael Ståldal
2007-11-27 22:42 ` Phillip Susi
2007-11-30 9:15 ` Mikael Ståldal
[not found] <554627.38779.qm@web36601.mail.mud.yahoo.com>
2007-12-06 12:32 ` Mikael Ståldal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4742B3A3.2050103@univits.com \
--to=mikael.staldal-ingen-reklam@univits.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).