home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.wizards
- Path: sparky!uunet!ddssuprs!lpc
- From: lpc@dickens.com (Luis P Caamano)
- Subject: Re: Selecting a "safe" socket/port for a server - HELP!
- Message-ID: <1992Sep9.154514.22952@dickens.com>
- Date: Wed, 9 Sep 1992 15:45:14 GMT
- References: <1992Sep4.234715.23719@anasazi.com>
- Organization: Dickens Data Systems, Inc.
- Lines: 33
-
- In article <1992Sep4.234715.23719@anasazi.com> duane@anasazi.com (Duane Morse) writes:
- >We have a number of server programs which listen on sockets/ports
- >to perform various transaction processing functions. We'd rather
- >not make these programs have super-user privileges in order to
- >use privileged, low-numbered sockets/ports, because it's an adminstrative
- >nuisance.
- >
- >Is it a safe strategy to use high-end port numbers for the listeners
- >in order to avoid having client programs possibly grab the
- >socket/port before the server? If so, what is considered "high-end"?
- >If not, is there an alternate strategy?
-
- "high-end" is over 5000.
-
- From W. R. Stevens, "Unix Network Programming," pg. 303-304
- -----
- reserved ports 1-1023
- ports automatically assigned by system 1024-5000
- ports assigned by rresvport() 512-1023
- -----
- "The system doesn't automatically assign an Internet port greater than
- 5000. It leaves these ports for user-developed, nonprivileged servers."
-
- Now, that's what the books says. Most implementations follow this
- scheme, but that's not the law.
- --
- ---------------------------------------------------------------------------
- Luis P. Caamano | lpc@dickens.com
- Dickens Data Systems, Inc. | uunet!dickens.com!lpc
- Atlanta, GA | (404) 475-8860
- ---------------------------------------------------------------------------
- If I think I know it all, I'll stop learning. -myself
- The more I learn, the more I know I know nothing. -somebody else
-