0

I have installed VSFTP and configured it by adding the following lines...

pasv_enable=YES
pasv_min_port=1024
pasv_max_port=1048
pasv_address=<ELASTIC_IP>

Then I added the port ranges 1024 - 1048 and 20 - 21. I then restarted VSFTPD and I can reach it locally from the EC2 instance. However, when I try to access it via my local computer (I am logging in anon for now) it asks me for username and password. I enter ftp and a@b.com but it just hangs after this is entered.

Am I missing something? Do I need to configure iptables? I tried...

-A INPUT -m tcp -p tcp --dport 20:21 -j ACCEPT
-A INPUT -m tcp -p tcp --dport 1024:1048 -j ACCEPT

But I get

iptables: Applying firewall rules: iptables-restore: line 1 failed
                                                       [FAILED]

What am I missing?

Alfred Huang
  • 17,654
  • 32
  • 118
  • 189
Jackie
  • 21,969
  • 32
  • 147
  • 289

1 Answers1

0

Weird it appears as though it does work, it is just that the ftp command runs differently on Cygwin.

When I ftp from the server itself I see..

$ ftp localhost
Connected to localhost (127.0.0.1).
220 Welcome to home security FTP service.
Name (localhost:ec2-user): ftp
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp>

From Cygwin it looks like

$ ftp -d <ip>
---> OPTS UTF8 ON
User (52.21.43.5:(none)): ftp
---> USER ftp
Password: a@b.com

---> PASS a@b.com
<blank line>

The blank line through me off, however, hitting ls+enter gets the list just as I would expect.

Jackie
  • 21,969
  • 32
  • 147
  • 289