I set up a vsftpd server using Debian 9 Stretch, and I can connect to it (and log in) using
Code: Select all
ftp localhost 21
Code: Select all
telnet localhost 21
Code: Select all
localhost
Code: Select all
ftp: connect: Connection refused
I thought that this may have something to do with the firewall, but typing
Code: Select all
sudo ufw status
Code: Select all
Status: active
To Action From
-- ------ ----
20:21/tcp ALLOW Anywhere
30000:31000/tcp ALLOW Anywhere
20:21/tcp (v6) ALLOW Anywhere (v6)
30000:31000/tcp (v6) ALLOW Anywhere (v6)
This seems to be working, but I notice several errors after I re-enable ufw (
Code: Select all
sudo ufw disable
Code: Select all
sudo ufw enable
Code: Select all
ERROR: problem running ufw-init
modprobe: FATAL: Module nf_conntrack_netbios_ns not found in directory /lib/modules/4.4.241-19420-g5a63ca2874a0
iptables-restore: line 77 failed
iptables-restore: line 33 failed
ip6tables-restore: line 138 failed
ip6tables-restore: line 33 failed
Problem running '/etc/ufw/before.rules'
Problem running '/etc/ufw/user.rules'
Problem running '/etc/ufw/before6.rules'
Problem running '/etc/ufw/user6.rules'
Could this be the problem, though
Code: Select all
sudo ufw status
Here is the "/etc/vsftpd.conf" file (w/o comments):
Code: Select all
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=YES
ftpd_banner=Welcome to the silly FTP service.
chroot_local_user=YES
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=vsftpduser_sub_token=$USER
local_root=/home/$USER/ftp
pasv_min_port=30000
pasv_max_port=31000
userlist_enable=YES
userlist_file=/etc/vsftpd.user_list
userlist_deny=NO
^I replaced the actual username with
Code: Select all
$USER
I have looked through countless threads concerning similar issues (like not being able to access a vsftpd server remotely, though it is accessible locally), and many of the solutions seem to be to restart the server / machine. I tried that as well as reinstalling "vsftpd", but nothing has changed. Also, default settings with "/etc/vsftpd.conf" still yields the same error.
Some links to similar problems:
https://serverfault.com/questions/27959 ... om-outside (I suppose that I would be on step 2. here.)
https://askubuntu.com/questions/890763/ ... ys-refused
https://www.linuxquestions.org/question ... 175584712/ (opening port 22 successfully without SSH or OpenSSH does not appear to alleviate the problem).
I tried to reinstall the "iptables" package for Stretch, but it looks as if its package does not include the "iptables" command (which would probably be helpful)! Thank you for reading.
Have a great day!