From owner-freebsd-questions Sat Dec 29 13:10:55 2001 Delivered-To: freebsd-questions@freebsd.org Received: from harrier.prod.itd.earthlink.net (harrier.mail.pas.earthlink.net [207.217.120.12]) by hub.freebsd.org (Postfix) with ESMTP id 52A9937B41B; Sat, 29 Dec 2001 13:10:44 -0800 (PST) Received: from dialup-209.245.140.30.dial1.sanjose1.level3.net ([209.245.140.30] helo=blossom.cjclark.org) by harrier.prod.itd.earthlink.net with esmtp (Exim 3.33 #1) id 16KQkc-0002EH-00; Sat, 29 Dec 2001 13:10:43 -0800 Received: (from cjc@localhost) by blossom.cjclark.org (8.11.6/8.11.3) id fBTLAdm07923; Sat, 29 Dec 2001 13:10:39 -0800 (PST) (envelope-from cjc) Date: Sat, 29 Dec 2001 13:10:39 -0800 From: "Crist J . Clark" To: Eugene Grosbein Cc: questions@FreeBSD.ORG Subject: Re: strange behavour of stock ftpd in STABLE: ports exhausion? Message-ID: <20011229131039.J93411@blossom.cjclark.org> References: <20011229170326.A98378@svzserv.kemerovo.su> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20011229170326.A98378@svzserv.kemerovo.su>; from eugen@www.svzserv.kemerovo.su on Sat, Dec 29, 2001 at 05:03:26PM +0700 X-URL: http://people.freebsd.org/~cjc/ Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sat, Dec 29, 2001 at 05:03:26PM +0700, Eugene Grosbein wrote: This is not really a topic for -stable. Diverted to -questions. > I use standard ftpd coming with FreeBSD 4.4-STABLE. > > My /etc/sysctl.conf contain these lines: > > net.inet.ip.portrange.hifirst=49152 > net.inet.ip.portrange.hilast=49200 > > This should restrict number of concurrent passive mode connections to 49. Why would it? > But this does much more. Suppose, a ftp client has good link to server, > 100Mb ethernet in my case. Suppose it uses passive mode and starts > to download very bug number of files sequentially, one then next then next... > It says TYPE I, PASV, RETR, TYPE I, PASV, RETR... > So, it can download 49 files in a row then server says > 425 Can't open passive connection: can't assign requested address I don't see why it would say that, but anyway... > If client does not break control connection, waits a little and > starts to download the rest of files, it can download next 49 files and so on. > > There are no other clients connected meantime. > How can this happed? Well... why wouldn't it? You get the 'can't assign requested address' error when you try to open a connection on top of an existing one. If the new TCP connection isn't trying to use an existing quartet (notice that the client changes the source port too), it should work fine. -- "It's always funny until someone gets hurt. Then it's hilarious." Crist J. Clark | cjclark@alum.mit.edu | cjclark@jhu.edu http://people.freebsd.org/~cjc/ | cjc@freebsd.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message