Arnold FLUTEAUX wrote:
> Yes I understand that we can solve this with PasvIPAddr but I don't
> understand why we get public IP with port 21 and not with another
> port. It's curious and this is also the case with IIS FTP Server.
> Why must we set PasvIPAddr only when we want to have transfert on
> another port than 21 ?

It's a router issue not a server problem. Your router replaces the 
private by its public IP in the server response on port 21,
because this is the default FTP control port. Many cheap routers
don't even do that on port 21. 
If the router would try to search and replace the IP string in FTP
data comming from any port it would slow down network speed notable.
Maybe it's possible to setup your router to do the same on a
different port as well?

---
Arno Garrels [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html


> Thanks
> 
> 
> 
> Arno Garrels wrote:
> Sounds like the router exchanges the private IP by the public IP in
> the server response on port 21 only. Is the router configured to allow
> incomming connections to the passive ports (a range set at the FTP
> server)? 
> 
> If this doesn't help:
> 
> TFtpServer has a property PasvIpAddr
> that should be assigned the public IP of the router.
> 
> - You may try my StunCli component:
> A small STUN client component implementing rfc3489:
>  <http://www.duodata.de/misc/delphi/Ics5-StunCli-03.zip>
> http://www.duodata.de/misc/delphi/Ics5-StunCli-03.zip
> Included is a small demo, it's not required to install the
> component, just unzip any file to the same directory and
> you are ready to go.
> 
> - Or HTTP-GET a php page on a public webserver and parse the
> response:
> 
> file getip.php:
> <?php
>    echo $HTTP_SERVER_VARS[REMOTE_ADDR];
> ?>
> 
> ---
> Arno Garrels [TeamICS]
>  <http://www.overbyte.be/eng/overbyte/teamics.html>
> http://www.overbyte.be/eng/overbyte/teamics.html
> 
> 
> Arnold FLUTEAUX wrote:
>> Hi,
>> 
>> 
>> 
>> I want to connect in Passiv mode to a server with, for example, this
>> public address: 80.118.187.130.
>> 
>> - If I connect to server on port 21, I receive after command "PASV",
>> this response
>> 
>> 227 Entering Passive Mode (80.118.187.130,132,178). So we have the
>> good IP address  and the client can connect it on well
>> 
>> 
>> 
>> - If now, I connect to server on port 2125, I receive after command
>> "PASV", this response
>> 
>> 227 Entering Passive Mode (192.168.2.150,132,178). So we haven't the
>> good address IP and so the client can't connect it well.
>> 
>> 
>> 
>> Can anyone explain me why on port 21 the result is ok and on another
>> port, the client doesn't receive the good address.
>> 
>> 
>> 
>> Thanks
>> 
>> Arnold
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to