I am very much new to Linux platform. As I wanted to setup a FTP server using Ubuntu, I installed it and configured the FTP in it. Everything was fine before I enable SSL in vsftpd config file. Apart from default settings, I added the following lines to enable FTP SSL in Ubuntu server.
ssl_enable=YES
allow_anon_ssl=NO
force_local_data_ssl=YES
force_local_logins_ssl=YES
ssl_tlsv1=YES
ssl_sslv2=YES
ssl_sslv3=YES
# Filezilla uses port 21 if you don't set any port
# in Servertype "FTPES - FTP over explicit TLS/SSL"
# Port 990 is the default used for FTPS protocol.
# Uncomment it if you want/have to use port 990.
listen_port=990
pasv_min_port=12000
pasv_max_port=12100
Now if I try to access it with ftps (ftps:// I an getting the below error after entering FTP user name.
No connection could be made because the target machine actively refused it.
Connection failed.
I noticed that it is trying to establish the connection using port 990. I just tried to open port 990 by adding rule in IPtables. The command I used is
sudo iptables -A INPUT -p tcp --sport 990 -j ACCEPT
But no success.
I request somebody's help to troubleshoot why the connection is not establishing and how I can open necessary ports in Ubuntu.
--sport 990
in your iptables rule is for the source port, but you want to open it as a destination port. Anyway, try to temporarily disable iptables. And are you specifying the destination port in your FTP client? If not, it will default to port 21. – mivk Dec 27 '21 at 00:34