From owner-freebsd-questions@FreeBSD.ORG Tue Dec 2 19:51:04 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2BF509F6 for ; Tue, 2 Dec 2014 19:51:04 +0000 (UTC) Received: from mout.gmx.com (mout.gmx.com [74.208.4.200]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EC6AFA1E for ; Tue, 2 Dec 2014 19:51:03 +0000 (UTC) Received: from [70.167.123.7] by 3capp-mailcom-lxa06.server.lan (via HTTP); Tue, 2 Dec 2014 20:45:46 +0100 MIME-Version: 1.0 Message-ID: From: "FreeBSD Questioner" To: freebsd-questions@freebsd.org Subject: Reserving localhost port numbers Content-Type: text/plain; charset=UTF-8 Date: Tue, 2 Dec 2014 20:45:46 +0100 Importance: normal Sensitivity: Normal X-Priority: 3 X-Provags-ID: V03:K0:/GuE+4nInKm+xcn9dVM0tx2JMRQ01yD0df8pUiABv+R S7dCbp9l4w/gI50478vaIUyi3ANbtCCcrpYm+wL/aShH4ZXVeC XmvI1FY+yNZuDa+Cig4lz0GuJqPdLtEU+oAnTXNb2hSNQm/JNI 6qvaqhtZuEZ+HA/TLiFXHgYfmrzFBzwEQ1nsvz/ZBY4t51m/Ey w1eA2CL0tGV91xT695JUZ9Rwtra+0/dK8VibbWGAH0rWujP7ZU w9xXaoQJWxlOBqMiH1zBmX5gOG2yOCNwKhdRscXUwggSFEYkQu dfNTLVq+crYikH3j/E60zE2brA/ X-UI-Out-Filterresults: notjunk:1; X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Dec 2014 19:51:04 -0000 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.