Re: Can't ftp from Linux box to windows-server - setsockopt

From: Bernard (qbernard_at_hotmail.com.discuss)
Date: 12/03/04


Date: Fri, 3 Dec 2004 18:35:52 +0800

Maybe I was confused. but your previous post is using passive mode.
> > 227 Entering Passive Mode (aaa,bbb,ccc,ddd,9,202).

But for XP -
PORT 192,168,1,37,4,100

The valid default ephemeral port range is for IIS 4/5 is 1024-5000
 4*256 + 100 = 1124
hence it is within the range.

-- 
Regards,
Bernard Cheah
http://www.tryiis.com/
http://support.microsoft.com/
http://www.msmvps.com/bernard/
"B H" <check4junk@gmail.com> wrote in message
news:v%Vrd.19933$Km6.252660@news4.e.nsc.no...
> "Alun Jones [MSFT]" <alunj@online.microsoft.com> wrote in message
> news:eT7WWgI2EHA.1188@tk2msftngp13.phx.gbl...
> > These values represent the port number your client is asked to connect
to.
> > In this case, 9*256 + 202 = 2506, so the client is being asked to
connect
> to
> > port 2506 at aaa.bbb.ccc.ddd.
> >
> > It seems like you've got some restritive firewall issues going on
between
> > your two systems.  If active mode works from a different machine, as
> you've
> > suggested, but passive mode never works, that means that the firewall at
> the
> > server is preventing incoming connections to the range of ports that the
> > server chooses from for passive mode connections.  If you can not change
> > that firewall's configuration, you will need to use active mode to
> connect.
> > Your Linux box appears to prevent that, by not opening up its own
> firewalls
> > to incoming FTP data connections.
>
> Thank you for the thorough reply.
> I think we're closing in on the solution now. I reinstalled Linux
yesterday
> and
> enabled the firewall in the Linux-box but marked for opening of among
other
> the ftp protocol. There were no more detailed sepcifications during
> installastions.
>
> But I have noticed one possibly important thing.....
> After debugging the ftp-log on my Windows XP box...which is the one which
> works for ftp to the same server I try to connect to with my
> Linux-box......I
> noticed that it choses ports from a much lower number. The 9 increment
> which is used for the Linux-box which should be added by 256 is 4 on the
> XP box. So this means that ports given on the XP box starts at:
>
> 4 * 256 = 1024
>
> So maybe a solution could be to find how I specify this increment number
> and change it from 9 to 4. I guess I have to dig in some manual pages.
>
> ===LOG FROM XP BOX===
> D:\Mine dokumenter>ftp -d www.mysite.com
> Koblet til iis11.online.no.
> 220 iis11 Microsoft FTP Service (Version 4.0).
> Bruker (iis11.online.no:(none)): myuser
> ---> USER b-haga
> 331 Password required for myuser.
> Passord:
> ---> PASS mypassword
> 230-Welcome to <myisp> shared windows hosting platform.
> 230-Find more information about <myisp> products on blabla
> 230-
> 230-See our Web-support FAQ pages at http://webfaq.blabla
> 230 User myser logged in.
> ftp> put hmmmm.rtf
> ---> PORT 192,168,1,37,4,100
> 200 PORT command successful.
> ---> STOR hmmmm.rtf
> 150 Opening ASCII mode data connection for hmmmm.rtf.
> 226 Transfer complete.
> FTP: 3317 byte overført p?0,00sekunder 3317000,00kB/sek.
> ftp> status
> COnnected to iis11.xxx.yy.
> Write: ascii; Control: On ; Sound: Off ; Leading text: On ; globbi
> ng: On
> Debug: On ; Enable write of number signs: Off .
> ftp> get reciprocal.htm
> ---> PORT 192,168,1,37,4,101
> 200 PORT command successful.
> ---> RETR reciprocal.htm
> 150 Opening ASCII mode data connection for reciprocal.htm(501 bytes).
> 226 Transfer complete.
> FTP: 501 byte mottatt p?0,00sekunder 501000,00kB/sek.
> ftp> ls
> ---> PORT 192,168,1,37,4,102
> 200 PORT command successful.
> ---> NLST
> 150 Opening ASCII mode data connection for file list.
> hmmmm.rtf
> reciprocal.htm
> [etc......]
> 226 Transfer complete.
> FTP: 433 byte mottatt p?0,02sekunder 27,06kB/sek.
> ftp> bye
> ---> QUIT
> 221  Bye!
> ======================
>
> Borge
>
>


Relevant Pages

  • Re: Passive means what during FTP?
    ... :227 Entering Passive Mode ... :ftp: connect: No route to host ... The FTP data transfer uses a connection that is separate from the ... address and port number to connect to for the data transfer. ...
    (comp.os.linux.setup)
  • Re: vsftpd working but not with Internet Explorer
    ... My guess is that IE is using passive mode by default. ... In passive mode Firewalls in front of the ftp server (or on the ftp ... In passive mode the server actually finds a free port (by default from ...
    (alt.os.linux)
  • Re: Port assignment
    ... It sounds like you're discussion using FTP to publish, ... references a "data connection," which is clearly a reference to the data ... FTP actually uses 2 TCP connections, one on the client port (32 in your ...
    (microsoft.public.frontpage.programming)
  • Re: VSFTP in passive mode
    ... When I FTP into the site I get connected but when I ... If I exit passive mode by entering "pass" the directory comes across. ... with them having to accept incoming connections ... originating from port 20 of the FTP server they're connecting to. ...
    (alt.os.linux.redhat)
  • Re: Iptables FTP question
    ... for secondary connections. ... Some ftp servers don't allow passive mode because it is less safe from ... algs that allow port mode for client machines. ...
    (comp.security.firewalls)