From owner-freebsd-net@FreeBSD.ORG Wed Nov 14 17:53:28 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AC86FB5D for ; Wed, 14 Nov 2012 17:53:28 +0000 (UTC) (envelope-from dustinwenz@ebureau.com) Received: from internet02.ebureau.com (internet02.tru-signal.biz [65.127.24.21]) by mx1.freebsd.org (Postfix) with ESMTP id 6AAC98FC15 for ; Wed, 14 Nov 2012 17:53:27 +0000 (UTC) Received: from service02.office.ebureau.com (internet06.ebureau.com [65.127.24.25]) by internet02.ebureau.com (Postfix) with ESMTP id 3B55AE0EFCA; Wed, 14 Nov 2012 11:53:27 -0600 (CST) Received: from localhost (localhost [127.0.0.1]) by service02.office.ebureau.com (Postfix) with ESMTP id 3659EE1B54C; Wed, 14 Nov 2012 11:53:27 -0600 (CST) X-Virus-Scanned: amavisd-new at ebureau.com Received: from service02.office.ebureau.com ([127.0.0.1]) by localhost (internet06.ebureau.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AejPERn3s0s1; Wed, 14 Nov 2012 11:53:25 -0600 (CST) Received: from square.office.ebureau.com (square.office.iscompanies.com [10.10.20.22]) by service02.office.ebureau.com (Postfix) with ESMTPSA id A43C8E1B538; Wed, 14 Nov 2012 11:53:25 -0600 (CST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.1 \(1498\)) Subject: Re: Default ephemeral port range From: Dustin Wenz In-Reply-To: <50A338FB.9060602@gont.com.ar> Date: Wed, 14 Nov 2012 11:53:25 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: References: <87A2D317-77BA-4641-979D-0AE43247D99E@ebureau.com> <50A338FB.9060602@gont.com.ar> To: Fernando Gont X-Mailer: Apple Mail (2.1498) Cc: freebsd-net@freebsd.org X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Nov 2012 17:53:28 -0000 On Nov 14, 2012, at 12:23 AM, Fernando Gont = wrote: > On 11/12/2012 02:57 PM, Dustin Wenz wrote: >> I'm trying to determine why the default ephemeral port range appears >> to be 10000 through 65535 in at least 8.1 through 9.1RC. >=20 > I had produced the patch that extended the ephemeral port range in > FreeBSD. My original patch extended the ephemeral port range to > 1024-65535. However, it was noted that X uses ports in the range > 1024-10000, and hence it was better to exclude that port range from = the > ephemeral port range. >=20 >=20 >> The IANA recommends the range be 49152 through 65535 >> (http://tools.ietf.org/html/rfc6056). >=20 > IANA *used* to recommend that range. In RFC 6056 we recommend > implementations to use the largest possible port range -- ideally > 1024-65536. >=20 Ah; that clarifies things quite a bit. There seems to be a lot of = incorrect/outdated information online about this. The suggestion from Eugene is also useful. I should be able to use = setsockopt() with IP_PORTRANGE_HIGH if I cared to use the high range = only. I probably don't want to do that in most cases, but it's good to = understand what the differences are. Thanks for the help! - .Dustin