Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
FTP Connection timed out error
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Kozmiq
n00b
n00b


Joined: 18 Mar 2025
Posts: 3

PostPosted: Tue Mar 18, 2025 5:02 pm    Post subject: FTP Connection timed out error Reply with quote

I just started ftp server. I installed server to VM Ubuntu 20.4. I use Bridge adaptor network and I see 192.168.80.111 ip. Also cmd "ping 192.168.80.111" gives

Quote:
Ping statistics for 192.168.80.111:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 1ms, Average = 0ms


sudo systemctl status vsftpd gives active "(running)" output
I allowed with "sudo ufw allow 20:tcp and 30000:30100/tcp", opened ports on windows defender inbound rules too.

When I try to connect from Win11 with "ftp 192.168.80.111" it gives Connection timed out error. What should I check?

Here is my config file. (Deleted commented lines for short version)

listen=YES
listen_ipv6=NO
anonymous_enable=YES
local_enable=YES
write_enable=YES
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_file=/var/log/vsftpd.log
chroot_local_user=NO
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

pasv_min_port=30000
pasv_max_port=30100
#anon_root=/home/unix/ftp/anonymus
Back to top
View user's profile Send private message
user
Apprentice
Apprentice


Joined: 08 Feb 2004
Posts: 227

PostPosted: Tue Mar 18, 2025 7:15 pm    Post subject: Reply with quote

Kozmiq, welcome to gentoo forum.

FTP server listen on TCP/21 (control port)
FTP server may also listen on "passive FTP mode" ports (your vsftpd config says: TCP/30000 until TCP/30100)
vsftpd config "connect_from_port_20=yes" means FTP server use source/from port TCP/20 when connecting to client provided port TCP/xyz in "active FTP mode".

"active FTP mode": after client and server handling via control port all demands, server connect to client again via client provided port for send/receive data.
"passive FTP mode": after client and server handling via control port all demands, client connect to server again via passive port for send/receive data.

Please write hundred times: FTP is dead
Back to top
View user's profile Send private message
Kozmiq
n00b
n00b


Joined: 18 Mar 2025
Posts: 3

PostPosted: Tue Mar 18, 2025 8:06 pm    Post subject: Reply with quote

user wrote:
Kozmiq, welcome to gentoo forum.

FTP server listen on TCP/21 (control port)
FTP server may also listen on "passive FTP mode" ports (your vsftpd config says: TCP/30000 until TCP/30100)
vsftpd config "connect_from_port_20=yes" means FTP server use source/from port TCP/20 when connecting to client provided port TCP/xyz in "active FTP mode".

"active FTP mode": after client and server handling via control port all demands, server connect to client again via client provided port for send/receive data.
"passive FTP mode": after client and server handling via control port all demands, client connect to server again via passive port for send/receive data.

Please write hundred times: FTP is dead


So what you say? It doesn't give me anything to solve problem. Yeah I got that you gave me the problem and I have to solve it by myself but still I can't. Should I change ports? What should I do?
Back to top
View user's profile Send private message
user
Apprentice
Apprentice


Joined: 08 Feb 2004
Posts: 227

PostPosted: Tue Mar 18, 2025 9:04 pm    Post subject: Reply with quote

Kozmiq wrote:
So what you say? It doesn't give me anything to solve problem. Yeah I got that you gave me the problem and I have to solve it by myself but still I can't. Should I change ports? What should I do?

you allowed TCP/20 on FTP server
Kozmiq wrote:
I allowed with "sudo ufw allow 20:tcp and 30000:30100/tcp", opened ports on windows defender inbound rules too.

but must allowing
user wrote:
FTP server listen on TCP/21 (control port)
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23218

PostPosted: Tue Mar 18, 2025 9:13 pm    Post subject: Reply with quote

Kozmiq, if you still need help, please show us the loaded firewall rules and the port(s) on which vsftpd is listening. Also, show the output of emerge --pretend --verbose net-ftp/vsftpd net-firewall/iptables net-firewall/ufw.
Back to top
View user's profile Send private message
Kozmiq
n00b
n00b


Joined: 18 Mar 2025
Posts: 3

PostPosted: Wed Mar 19, 2025 11:49 am    Post subject: Reply with quote

I don't know how but today it works. I created Windows' own ftp server and it was working yesterday. But today my ubuntu ftp server working but windows one isn't. I assume it caused by public wifi or something.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum