Re: Problem with ftp access

2007-11-20 Thread Nicolas FRANCOIS
Le Thu, 15 Nov 2007 16:16:32 +0100 thorsten [EMAIL PROTECTED] a écrit :

 Hi,
 
 I know it is obvious but nevertheless: *did* you try to use passive mode?

Well, it's not THAT obvious :-(
 
 *without* passive:
 
 230 Login successful.
 Remote system type is UNIX.
 Using binary mode to transfer files.
 ftp ls
 200 PORT command successful. Consider using PASV.
 
 
 *with* passive:
 
 230 Login successful.
 Remote system type is UNIX.
 Using binary mode to transfer files.
 ftp pass
 Passive mode on.
 ftp ls
 227 Entering Passive Mode (63,245,208,138,207,223)
 150 Here comes the directory listing.
 -rw-r--r--1 ftp  ftp   528 Nov 01 23:27 README
 -rw-r--r--1 ftp  ftp   560 Sep 28 08:07 index.html
 drwxr-xr-x   30 ftp  ftp  4096 Nov 15 14:40 pub
 226 Directory send OK.
 ftp quit
 221 Goodbye.

It works ! Could this indicate something I did wrong ? Can you explain it
to me ?

Thank you, anyway !

\bye

-- 

Nicolas FRANCOIS  |  /\ 
http://nicolas.francois.free.fr   | |__|
  X--/\\
We are the Micro$oft.   _\_V
Resistance is futile.   
You will be assimilated. darthvader penguin
-- 
http://linuxfromscratch.org/mailman/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page


Re: Problem with ftp access

2007-11-20 Thread thorsten
 *without* passive:

 230 Login successful.
 Remote system type is UNIX.
 Using binary mode to transfer files.
 ftp ls
 200 PORT command successful. Consider using PASV.


 *with* passive:

 230 Login successful.
 Remote system type is UNIX.
 Using binary mode to transfer files.
 ftp pass
 Passive mode on.
 ftp ls
 227 Entering Passive Mode (63,245,208,138,207,223)
 150 Here comes the directory listing.
 -rw-r--r--1 ftp  ftp   528 Nov 01 23:27 README
 -rw-r--r--1 ftp  ftp   560 Sep 28 08:07 index.html
 drwxr-xr-x   30 ftp  ftp  4096 Nov 15 14:40 pub
 226 Directory send OK.
 ftp quit
 221 Goodbye.
 
 It works ! Could this indicate something I did wrong ? Can you explain it
 to me ?
 
 Thank you, anyway !
 
 \bye

Hi again,

I suppose it is your firewall blocking the inbound ftp connection which 
the ftp server tries to establish after the ls command. In active mode 
the server initiates a new connection to your machine while in passive 
mode the server opens a new port, tells your machine the portnumber and 
your machine initiates the new connection. So rules like eg.

iptables -A INPUT -p tcp -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -p tcp -j DROP

which allow connections established from your machine but block new 
incoming connections, allow passive ftp but not active.

Thorsten
-- 
http://linuxfromscratch.org/mailman/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page


Re: Problem with ftp access

2007-11-07 Thread randd
Nicholas, 

 I have an annoying problem with my new LFS box (LFS SVN post 6.3, BLFS
 SVN) : Everything is working quite OK...except ftp. When I want to
 connect to an ftp server, everything goes OK until I want to dir a
 directory : 
 
 ftp ls
 200 PORT command successful. Consider using PASV.
 425 Failed to establish connection.

I've had this exact same problem.  Unfortunately, it was a while ago and I 
can't remember what the cure (or the exact cause was). 

Fortunately, I do remember it had something to do with the fact that I had 
two or more NICs in that machine.  In my case I couldn't get a connection to 
go under any circumstances, period (eg., even if I set ftp up for PASV 
mode). 

I'll keep looking in my archives and see if I can't find something more 
specific.  In the meantime, Dan's suggestion r.e. strace is a good one; you 
might also get some use out of tcpdump 
(http://packetstormsecurity.org/sniffers/tcpdump/ - read the docs; I'm 
fairly certain you'll need libpcap, too). 

Two quick questions - they're pretty obvious, but you know how that goes - 
you're not blocking port 21 or port 22, right?  And, if you have openssh 
installed, have you tried sftp? 

Hope that helps 

 - Larry 

-- 
http://linuxfromscratch.org/mailman/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page


Problem with ftp access

2007-11-06 Thread Nicolas FRANCOIS
Hi.

I have an annoying problem with my new LFS box (LFS SVN post 6.3, BLFS
SVN) : Everything is working quite OK...except ftp. When I want to
connect to an ftp server, everything goes OK until I want to dir a
directory :

ftp ls
200 PORT command successful. Consider using PASV.
425 Failed to establish connection.

Same problem with the ftp program from cpan, I guess, for I can only
retreive packages with wget or lynx. With Firefox and Konqueror, ftp is
fine.

Ncftp works fine, so I think it's a specific problem from the core ftp
program installed in LFS. How can I trace this problem to it's origin ?

Thanks for any help.

\bye

-- 

   Nicolas FRANCOIS
http://nicolas.francois.free.fr
 A TRUE Klingon programmer does NOT comment his code
-- 
http://linuxfromscratch.org/mailman/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page


Re: Problem with ftp access

2007-11-06 Thread Dan Nicholson
On 11/6/07, Nicolas FRANCOIS [EMAIL PROTECTED] wrote:

 I have an annoying problem with my new LFS box (LFS SVN post 6.3, BLFS
 SVN) : Everything is working quite OK...except ftp. When I want to
 connect to an ftp server, everything goes OK until I want to dir a
 directory :

 ftp ls
 200 PORT command successful. Consider using PASV.
 425 Failed to establish connection.

 Same problem with the ftp program from cpan, I guess, for I can only
 retreive packages with wget or lynx. With Firefox and Konqueror, ftp is
 fine.

 Ncftp works fine, so I think it's a specific problem from the core ftp
 program installed in LFS. How can I trace this problem to it's origin ?

I don't have any ideas, but I would try strace.

http://sourceforge.net/projects/strace/

strace -f -o ftp.log ftp

Then just do what you normally do. There will be a lot of output in
ftp.log, hopefully something will point you in the right direction.

--
Dan
-- 
http://linuxfromscratch.org/mailman/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page