I set up a FTP server on a virtual machine in my private network. I have an external ip address - x.x.x.x
and use pfSense
to forward ports. My FTP server is vsftpd
, my OS is newest Ubuntu 16.04
.
FTP internal address is 192.168.1.34
, external address of server itself is x.x.x.x
.
I know I should forward both port 21 and 20, and I did it. Here'e NAT rules from pfSense
:
listen=NO
listen_ipv6=YES
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
connect_from_port_20=YES
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=vsftpd
rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
ssl_enable=NO
allow_writeable_chroot=YES
port_enable=YES
pasv_addr_resolve=NO
connect_from_port_20=YES
pasv_enable=YES
pasv_min_port=40000
pasv_max_port=40100
pasv_address=x.x.x.x
For me everything seems fine, but when I try to connect to my server, I'm getting Error: Connection timed out. Error: Failed to retrieve directory listing.
I did sudo ufw disable
.