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

  1. Newsgroups: comp.unix.wizards
  2. Path: sparky!uunet!mcsun!Germany.EU.net!news.netmbx.de!zrz.tu-berlin.de!math.fu-berlin.de!Sirius.dfn.de!darwin.sura.net!gatech!rpi!scott.skidmore.edu!psinntp!psinntp!commpost!opus!fia!pub_one!jogulin
  3. From: jogulin@pub_one.fia.dmg.ml.com (Joseph Ogulin)
  4. Subject: Re: Selecting a "safe" socket/port for a server - HELP!
  5. Message-ID: <1992Sep11.132403.9126@fia.dmg.ml.com>
  6. Sender: jogulin@pub_one (Joseph Ogulin)
  7. Nntp-Posting-Host: pub_one
  8. Organization: The Rift from Here to There
  9. References: <1992Sep4.234715.23719@anasazi.com> <1992Sep9.154514.22952@dickens.com>
  10. Date: Fri, 11 Sep 1992 13:24:03 GMT
  11. Lines: 43
  12.  
  13. In article <1992Sep9.154514.22952@dickens.com>, lpc@dickens.com (Luis P Caamano) writes:
  14. |> In article <1992Sep4.234715.23719@anasazi.com> duane@anasazi.com (Duane Morse) writes:
  15. |> >We have a number of server programs which listen on sockets/ports
  16. |> >to perform various transaction processing functions.  We'd rather
  17. |> >not make these programs have super-user privileges in order to
  18. |> >use privileged, low-numbered sockets/ports, because it's an adminstrative
  19. |> >nuisance.
  20. |> >
  21. |> >Is it a safe strategy to use high-end port numbers for the listeners
  22. |> >in order to avoid having client programs possibly grab the
  23. |> >socket/port before the server?  If so, what is considered "high-end"?
  24. |> >If not, is there an alternate strategy?
  25. |> 
  26. |> "high-end" is over 5000.
  27. |> 
  28. |> From W. R. Stevens, "Unix Network Programming," pg. 303-304
  29. |> -----
  30. |> reserved ports                             1-1023
  31. |> ports automatically assigned by system  1024-5000
  32. |> ports assigned by rresvport()            512-1023
  33. |> -----
  34. |> "The system doesn't automatically assign an Internet port greater than
  35. |> 5000.  It leaves these ports for user-developed, nonprivileged servers."
  36. |> 
  37. |> Now, that's what the books says.  Most implementations follow this 
  38. |> scheme, but that's not the law.
  39.  
  40. You might also want to check RFC 1060 - Assigned Numbers.
  41.  
  42. For those who do not know where to get them, they are available
  43. from nic.ddn.mil.  There is an automated mail server (service@nic.ddn.mil)
  44. where your commands are the Subject line.  They are also available through
  45. anonymous ftp.
  46.  
  47. -- 
  48. ==> "You never f**king know the answer when it's important." --The Doctor <==
  49. Joe Ogulin
  50.  
  51. jogulin@camelot.fia.dmg.ml.com        joe@monroe.pilot.dmg.ml.com
  52. jogulin@apollo.stevens-tech.edu        gcs_jogulin@stevens.bitnet
  53.  
  54. Disclaimer:  The above article is solely my opinion and does not necessar-
  55. ily reflect that of my employer.  The content is my responsibility alone.
  56.