Re: What Port Should I Use?
- From: ibuprofin@xxxxxxxxxxxxxxxxxxxxxx (Moe Trin)
- Date: Thu, 14 Feb 2008 21:30:23 -0600
On 13 Feb 2008, in the Usenet newsgroup comp.os.linux.networking, in article
<47b2807f$0$20227$5a62ac22@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>, Dan N wrote:
IANA divides port numbers into three groups, well known, registered and
dynamic/private.
According to IANA, my server should not use any of the registered ports.
You can use any port you wish to. You need only live with the consequences.
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. Do you want to run it on 25/tcp or 2048/tcp - go for it, but
expect that clients are going to need to know where you've hidden it, and
what sort of protocol (not just network, like TCP or UDP or what-ever, but
the application level protocol - what words are in those packets, in what
order, and so on).
http://www.iana.org/assignments/port-numbers says that ports 0-1023 are
well known ports, providing services on most systems. I mention using
port 25 above, which is the well-known port for SMTP (mail transfer). In
the event that your system was going to send mail to another, your system
would look for a mail server on port 25 on that other server, because that
is what the protocol expects. If you wanted to run a mail server on port
27, you could do so, and not one of the Internet Police Force would come
to your house and beat you to a pulp for trying. By the same token, don't
expect to many other systems in the world to know you're on a non-standard
port. Can you say "compatibility"?
But if I use of of the dynamic/private ports don't I run the risk of the
port already having been assigned to some socket?
That's a problem for you when you are configuring the server. Start by
running the command 'netstat -anptu' and see what ports are in use now.
You may not want to try to use those, because any process trying to use
a port that is being used elsewhere will get an error message saying
that the port is in use, and suggesting you go elsewhere.
Many of the ports in the registered range are not assigned.
Registered Ports are in the range 1024-49151, and please tell me if that
has stopped eleventy-zillion viruses from using those ports. Or have
you looked somewhere else and found that The Cult Of The Dead Cow has
managed to register port 31337 for the family of Back Oriface worms?
Would one of them be a better choice?
Try it and see what happens. The worst thing you might run into is your
ISP or an upstream is tossing any packets to/from that port into the bit
bucket because it looks like yet another windoze virus, or they could
increase what they charge you because of your attempted mis-use of their
bandwidth..
Old guy
.
- Follow-Ups:
- Re: What Port Should I Use?
- From: Dan N
- Re: What Port Should I Use?
- References:
- What Port Should I Use?
- From: Dan N
- What Port Should I Use?
- Prev by Date: Re: What Port Should I Use?
- Next by Date: Re: What Port Should I Use?
- Previous by thread: Re: What Port Should I Use?
- Next by thread: Re: What Port Should I Use?
- Index(es):
Relevant Pages
|