Re: What Port Should I Use?
- From: Thomas Schodt <spamtrap0607@xxxxxxxxxxxxxxxxx>
- Date: Fri, 15 Feb 2008 07:32:44 +0000
Dan N wrote:
On Thu, 14 Feb 2008 21:30:23 -0600, Moe Trin wrote:
You can use any port you wish to. You need only live with the
consequences.
That's really the crux of the matter, isn't it.
If I start up my server using a port in the dynamic/private range then I
run the risk that the port is already in use by some client on the same
host. When the client started, the tcp stack would have dynamically
assigned it a port and that just might be the one that I want my server to
listen on. So this doesn't seem like a good option.
Yet it is common practice. Cases in point; JBoss - the default distribution uses a bunch of ports at the start of the dynamic range - another is apache which is commonly configured to run on port 8080 instead of port 80.
But as these are servers they are usually started when the host starts so they will be first to lay claim to these port numbers.
> This leaves me with
ports in the well known or registered ranges.
You could use a port under 1024, as long as it is free - as in not to be used by any other service you might need to start on the host.
But if I want to adhere to standards what port do I use? IANA says that
the well known and registered ports shouldn't be used without
registration. And my server is using a proprietary protocol that I
really don't have any need to register.
As was pointed out; you do not need to.
"The purpose of port registration is to allow others to have some clue where
to connect to your server to find what-ever service you may want to be
providing."
The only choice I seem to have is to not adhere to standards. The
conclusion I've come to is to use a port somewhere in the registered
range.
Maybe you should start smaller.
Run up apache. See that you can connect on port 80.
Reconfigure apache to listen on port 8080
reload apache (or stop and start).
See that you can connect on port 8080.
Decide if it is 'bad' that apache is now listening on port 8080.
.
- References:
- What Port Should I Use?
- From: Dan N
- Re: What Port Should I Use?
- From: Moe Trin
- Re: What Port Should I Use?
- From: Dan N
- What Port Should I Use?
- Prev by Date: Fedora Core 8 wifi on Presario C700
- Next by Date: CONFIG_IP_ROUTE_FWMARK
- Previous by thread: Re: What Port Should I Use?
- Next by thread: Re: What Port Should I Use?
- Index(es):
Relevant Pages
|