Article View: borland.public.cppbuilder.internet.socket
Article #822TIdFTPServer, passive mode behind NAT
From: David Perkins
Date: Wed, 19 Sep 2007 12:14
Date: Wed, 19 Sep 2007 12:14
28 lines
1636 bytes
1636 bytes
I have a small app that uses TIdFTPServer with no bindings. It's behind NAT on IP 192.168.1.5. I've forwarded ports 20/21. I'm trying to use passive mode to connect to the server from an external IP, but it fails. The external connection is told to connect to 192.168.1.5,20 which it cannot. So, I have overridden OnPASV and assigned: VIP = "a.b.c.d"; VPort = m_pFtpServer->DefaultDataPort; Where a.b.c.d is my router IP (WAN) address. When I then attempt to connect I get an error: "550 Cannot assign requested address." Q. Any idea why this error occurs? Q. If I do not assign the VPort, would one be assigned by default? How would I specify a range of Ports it could choose from - by modifying a TIdSocketHandle.ClientPortMax/Min? Using BCB2006, Indy v9 Thanks David
Technical Details
Message-ID:
<46f11284$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news1.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 11508e,d2a2b002f04ef11a,start X-Google-Attributes: gid11508e,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Date: Wed, 19 Sep 2007 13:14:31 +0100 From: David Perkins <please@no-spam.com> User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.internet.socket Subject: TIdFTPServer, passive mode behind NAT Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 217.155.64.70 Message-ID: <46f11284$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1190204036 217.155.64.70 (19 Sep 2007 05:13:56 -0700) Lines: 28 Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news1.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail