I have setup an FTPS server on ubuntu using vsftps
Here are the FTP configurations: sudo vim /etc/vsftpd.conf
listen=NO
listen_ipv6=YES
anonymous_enable=NO
local_enable=YES
write_enable=YES
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
connect_from_port_20=NO
# pasv_address=13.55.13.221 # <-- this is the public IP (note that this line is commented)
# pasv_promiscuous=YES
idle_session_timeout=1200
data_connection_timeout=3600
accept_timeout=500
connect_timeout=5000
allow_writeable_chroot=YES
chroot_local_user=YES
user_sub_token=$USER
local_root=/home/$USER/uploads
pasv_enable=YES
pasv_min_port=40000
pasv_max_port=50000
userlist_enable=YES
userlist_file=/etc/vsftpd.userlist
userlist_deny=NO
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=vsftpd
rsa_cert_file=/etc/ssl/private/vsftpd.pem
rsa_private_key_file=/etc/ssl/private/vsftpd.pem
ssl_enable=YES
allow_anon_ssl=NO
force_local_data_ssl=YES
force_local_logins_ssl=YES
ssl_tlsv1=YES
ssl_sslv2=NO
ssl_sslv3=NO
require_ssl_reuse=NO
ssl_ciphers=HIGH
utf8_filesystem=YES
The Server is an EC2 instance on AWS and we are not using a NAT box.
When I try to connect the FTP server using FileZilla it works fine.
When I give the server url to the client, the client gets the following error:
Here is the Log File: Connection timed out - "connect(2) for 172.31.39.144:42176
The strage thing is that the IP shown in the error is the private IP of the EC2 instance. The Client connects to ftp.mydomain.com which resolves to the public IP of the instance. So I am not what's going wrong on the client that tries to connect to private IP of the EC2 instance? I am also not sure why FileZilla client is able to connect to the same server with no issue?
0 Answers