Ad Widget

Collapse

Why are port numbers limited from 1024 to 32767?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cbergmann
    Junior Member
    • Jul 2024
    • 2

    #1

    Why are port numbers limited from 1024 to 32767?

    Hi,

    I use a shared hosting service where I can get ports of the host opened to my account. "The port numbers are generated automatically in the range from 40.000 to 61.000 and cannot be chosen arbitrarily." [1].

    Unfortunately most zabbix ports (LISTEN_PORT, CONFIG_SERVER_PORT, CONFIG_JAVA_GATEWAY_PORT, CONFIG_LISTEN_PORT) are limited to the range 1024 to 32767.
    The lower limit is totally understandable as these are well-known/system ports. The upper limit on the other hand seems arbirary. I would have understood a limit of 49151 which is the border to the dynamic ports but a limit of 65535 would be more flexible in my opinion.

    Is there someone here that knowns the reasoning behind this limit?

    As a workaround I have prepared a patch (see attached file) that changes the range but that requires me to recompile zabbix for each new version.

    Thanks
    Clemens


    [1]https://manual.uberspace.de/basics-ports/
    Attached Files
    Last edited by cbergmann; 18-09-2024, 09:22.
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #2
    Maybe it is just a remnant of old times and noone has complained hard enough, so it is not changed..:P You can always submit a ZBX ticket to support and hope it receives enough attention to get into release..

    Comment

    • RoyK
      Junior Member
      • Jan 2016
      • 20

      #3
      Waiting for Zabbix to fix a bug, is quite often time-consuming som I guess the simplest "fix" is to just work around it. Luckily, there's a ton of ways to locally forward ports, be it in userspace or in kernel (with netfilter or similar)
      https://unix.stackexchange.com/quest...ort-to-another has som examples

      Comment

      Working...