I have a FTP server (vsftpd) setuped on a Linux box (Ubuntu server). When I try to connect with a computer on the same network everything works fine as expected.

But as soon the IP is external it won't connect..

I first assumed the port was blocked, but then:

localserver:$ sudo tail -f /var/log/vsftpd.log
Wed Jan 13 14:21:17 2010 [pid 2407] CONNECT: Client "xxx.xxx.107.4"
remotemachine:$ netcat svn-motion.no-ip.biz 21
220 FTP Server

And it hangs there. Do any ports other than 21 need to be open?

link|improve this question
feedback

2 Answers

If the server is behind any type of firewall you may need to make sure the remotemachine is using FTP Passive mode.

link|improve this answer
sftp does not use multiple connection, it only use 21 and thus is passive by default. – h3. Jan 13 '10 at 19:35
if you are using SFTP then the default port would probably be 22 – quickcel Jan 13 '10 at 19:40
Oh, right.. when using ftp only I get "Unknown server error" – h3. Jan 13 '10 at 19:43
When using the IP directly it works .. – h3. Jan 13 '10 at 20:18
feedback

Are you trying to connect to the server's external IP from an internal computer? If so, and if you are using a typical home router in a NAT configuration, the problem may actually be the router.

Presumably you've configured the router to forward FTP to the Ubuntu server, and you're trying to test that this works. But when you test the external IP directly from your internal network, your router has to support a "hairpin" route. Your router must send traffic from an internal host, out through the external IP, back into the external IP, and finally forward that back to your server's internal IP -- all on the same device. Most consumer routers don't handle this situation properly.

So you need test from a real external host. You have several options:

  • Use an internet port-testing service like Can You See Me.
  • Send your test traffic through a proxy.
  • Have a friend test from their network.
  • Find a local coffeeshop with WiFi and test from there.
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.