From owner-freebsd-questions@FreeBSD.ORG Tue Dec 13 10:24:24 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3055916A41F for ; Tue, 13 Dec 2005 10:24:24 +0000 (GMT) (envelope-from pietro.cerutti@gmail.com) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.204]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2D1B143D62 for ; Tue, 13 Dec 2005 10:24:20 +0000 (GMT) (envelope-from pietro.cerutti@gmail.com) Received: by wproxy.gmail.com with SMTP id i1so86238wra for ; Tue, 13 Dec 2005 02:24:20 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=myECtPwkjlYHKuOh4SYTrjMsVllrzGnTQWfAdxSE3lAvnJVWhm/lERCGC89h//P4UuO67xi4Zgaf1kuJe9UNdkyfWFZBR9Y2gYufUj865cB2aNveDPTwJEERM8gib89E/qOimFeGiEeljQPNQoR2kIEJwsXMXkp0X1fNCnVy3nk= Received: by 10.65.216.4 with SMTP id t4mr469124qbq; Tue, 13 Dec 2005 02:24:20 -0800 (PST) Received: by 10.64.150.18 with HTTP; Tue, 13 Dec 2005 02:24:20 -0800 (PST) Message-ID: Date: Tue, 13 Dec 2005 11:24:20 +0100 From: Pietro Cerutti To: Imran Imtiaz , FreeBSD In-Reply-To: <200512130744.jBD7iUUj073920@darkstar.thelakecity.com.pk> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <200512130744.jBD7iUUj073920@darkstar.thelakecity.com.pk> Cc: Subject: Re: ftp problem X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Dec 2005 10:24:24 -0000 On 12/13/05, Imran Imtiaz wrote: > I am running a ftp server on my computer it works fine if i do not enable= the firewall but as I enable the firewall on my system ftp doesn't works a= lthough I have open port 21 in firewall. my ftp client do gets connected bu= t when i try to dir or any other commands its say no route. below is the ou= tput of my ftp client > C:\Documents and Settings\Asif>ftp darkstar.thelakecity.com.pk > Connected to darkstar.thelakecity.com.pk. > 220 ProFTPD 1.2.10 Server (ProFTPD Default Installation) [202.59.74.139] > User (darkstar.thelakecity.com.pk:(none)): anonymous > 331 Anonymous login ok, send your complete email address as your password= . > Password: > 230 Anonymous access granted, restrictions apply. > ftp> dir > 200 PORT command successful > 425 Unable to build data connection: No route to host > ftp> quti > Invalid command. > ftp> quit > 221 Goodbye. FTP works in a two-channel mode. One channel is used for commands, while the other is the data channel, where your files go through... Example of sockstat on the server, during an ftp connection COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS ftpd 55377 6 tcp4 192.168.1.6:21 =20 192.168.1.3:58121 ftpd 55377 9 tcp4 192.168.1.6:53808 =20 192.168.1.3:60020 As you can see, the first line is the command channel (local port 21 used), while the second line is the data channel (local port 53808 (could be any)). Your firewall accepts connections on port 21, but doesn't allow the data channel to be extabilished. Can you post the relevant lines in your firewall rules file? -- Pietro Cerutti Beansidhe - SwiSS Death / Thrash Metal Windows: "Where do you want to go today?" Linux: "Where do you want to go tomorrow?" FreeBSD: "Are you guys coming or what?"