Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm trying to set up an old box as a backup server (running 10.04.4 LTS). I intend to use 3rd party software on my PC to periodically connect to my server via FTP(S) and to mirror certain files. For some reason, all FTP connection attempts fail UNLESS I'm simultaneously connected via SSH.

For example, if I use putty to test the connection to port 21, the system hangs and times out. I get:

220 Connected to LeServer
USER lucas
331 Please specify the password.
PASS [password]
<cursor>

However, when I'm simultaneously logged in (in another session) everything works:

220 Connected to LeServer
USER lucas
331 Please specify the password.
PASS [password]
230 Login successful.

Basically, this means that my software will never be able to connect on its own, as intended. I know that the correct port is open because it works (sometimes) and nmap gives me:

Starting Nmap 5.00 ( http://nmap.org ) at 2012-03-20 16:15 CDT
Interesting ports on xx.xxx.xx.x:
Not shown: 995 closed ports
PORT    STATE SERVICE
21/tcp  open  ftp
22/tcp  open  ssh
53/tcp  open  domain
139/tcp open  netbios-ssn
445/tcp open  microsoft-ds

Nmap done: 1 IP address (1 host up) scanned in 0.15 seconds

My only hypothesis is that this has something to do with iptables. Maybe it's allowing only established connections? I don't think that's how I set it up, but maybe? Here's my iptables rules for INPUT:

lucas@rearden:~$ sudo iptables -L INPUT
Chain INPUT (policy DROP)
target     prot opt source               destination
fail2ban-ssh  tcp  --  anywhere             anywhere            multiport dports ssh
ufw-before-logging-input  all  --  anywhere             anywhere
ufw-before-input  all  --  anywhere             anywhere
ufw-after-input  all  --  anywhere             anywhere
ufw-after-logging-input  all  --  anywhere             anywhere
ufw-reject-input  all  --  anywhere             anywhere
ufw-track-input  all  --  anywhere             anywhere
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:ftp

I'm using vsftpd. Any thoughts/resources on how I could fix this?

L

share|improve this question

closed as too localized by Luis Alvarado Apr 5 '13 at 4:16

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

    
"it works (sometimes)" -- please, what do you mean? Did you try to wait [forever] for FTP prompt, without trying to open SSH connection? –  brownian Mar 21 '12 at 8:39
    
Sorry, by sometimes I just meant that it works when an SSH connection is simultaneously maintained, and not otherwise. If no SSH connection is present, the server disconnects the connection after 60s. –  Lucas Mar 22 '12 at 2:23
    
Have you expirienced this only with "3rd party software" or "native" ftp client does the same? To be honest, all this is strange .) –  brownian Mar 22 '12 at 7:39
    
This question appears to be abandoned and unanswered, are you still looking for an answer? If this question no longer applies then you can either delete it or answer it yourself if you've solved the problem. Thanks! –  Eric Carvalho Apr 5 '13 at 2:13
add comment