1

I have installed vsftpd on a Ubuntu server on AWS however I can not access it via its Elastic IP. If I ssh to the server, I can then ftp to it using its internal IP, but I can't ftp using its public IP. What am I doing wrong?

As far as I can recall, the only change I made to vsftp.conf was to uncomment local_enable=YES.

The FTP server is in a VPC. The default network ACL's are in place, and I have opened up TCP ports 20-22 to traffic from anywhere.

When I run ftp 13.my.ip.address it simply says the connection timed out.

  • Can you ping your server from an external PC? Check your internet gateway, routing table, security groups, network ACL. If all that is ok then it's likely application configuration. You can of course use the sftp server built into ssh, with local users in the instance. Don't forget backups. – Tim Sep 4 '19 at 1:03
  • I can't ping, but I can browse a web site on the server, so obviously it is reachable. – Kim Sep 4 '19 at 2:28
  • That suggests the problem is with the ftp server software, the security group, or the instance firewall. – Tim Sep 4 '19 at 7:31
1

Can you check below:

  1. Port 20 and 21 are open at security group.
  2. Above ports should be opened in iptables inside of host.
  3. Check which address ftp is listening.
  4. Is it enabled in any wrapper file(host allow/deny or userlist_file in conf) some config parameters are below.

    userlist_deny=NO

    userlist_enable=YES

    userlist_file=/etc/vsftpd.allowed_users

Hope this will help.

| improve this answer | |
0

I believe the default security group only has 22, 80 and 443 open, so you will need to open 21 if you haven't already.

| improve this answer | |
  • I have opened the ports on the security group... – Kim Sep 4 '19 at 2:27
  • Try nmap $public_ip to see if the port is open and something's listening. – pguardiario Sep 4 '19 at 2:51
  • nmap says port 20 is filtered ftp-data, and 21 is filtered ftp – Kim Sep 4 '19 at 3:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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