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
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


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