ftp problem

Pietro Cerutti pietro.cerutti at gmail.com
Tue Dec 13 02:24:24 PST 2005


On 12/13/05, Imran Imtiaz <imran at darkstar.thelakecity.com.pk> 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 although I have open port 21 in firewall. my ftp client do gets connected but when i try to dir or any other commands its say no route. below is the output 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         
192.168.1.3:58121
ftpd               55377 9     tcp4        192.168.1.6:53808    
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
<pietro.cerutti at gmail.com>

Beansidhe - SwiSS Death / Thrash Metal
<www.beansidhe.ch>

Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming or what?"


More information about the freebsd-questions mailing list