Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Dec 2014 20:45:46 +0100
From:      "FreeBSD Questioner" <freebsd-questions@gmx.com>
To:        freebsd-questions@freebsd.org
Subject:   Reserving localhost port numbers
Message-ID:  <trinity-2843f6bc-834a-464e-a671-a16327e982ae-1417549546056@3capp-mailcom-lxa06>

next in thread | raw e-mail | index | archive | help

Hello,

This question is regarding a networking scheme, utilizing multiple remote sensor systems in the field, which connect to a central freebsd server via ssh.

When making these connections, the remote field systems "reverse tunnel" certain listening ports to the server via the ssh -R parameter.

Since there are multiple field systems, each one has a unique offset to which to map it's listening ports, when tunneling them to the central server. This prevents multiple field systems from attempting to listen on the same port number on the central server.

My question involves these listening port numbers on the central freebsd server: 

Is there a way to reserve a block of port numbers, preventing them from being used as "ephemeral" ports, by other network traffic on the central server?

It would be desirable to reserve a block of 10000 or so ports, anywhere above the 1024 "privileged port" range.

Thank you for any suggestions or references that may shed light on managing the networking stack's allocation of localhost port numbers.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?trinity-2843f6bc-834a-464e-a671-a16327e982ae-1417549546056>