0

i have a question about vsftp please ! if i use active mode for my ftp server , should i see that my vsftp server is listening on 21 and 20 port when i use netstat ?? when i test

sudo netstat -lnp | grep vsftp

i get only port 21

tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN 47/vsftpd

1 Answer 1

0

Port 20 is used as the local port number for the outgoing connection, so the service never listens on it, but still needs permission to bind to low port numbers.

Normally, outgoing connections are made from sockets that are not bound to a specific local address and port number, and initiating the connection then assigns a random port number and the local address of the interface that the connection will go out to.

FTP explicitly says that outgoing connections should use port 20, and the FTP client can then verify the remote port number on the incoming connection to make sure it originates from a process running as root, so that is an archaic security feature.

1
  • another question please ??? if i use active mode when i'm with inseacure mode (no certificate used) and i want to test the server with certifacte should'i user passive mode ! i'm obligated ?? Apr 14, 2021 at 12:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .