home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / unix / wizards / 3863 < prev    next >
Encoding:
Text File  |  1992-09-09  |  1.9 KB  |  44 lines

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