garethflowers / docker-ftp-server

A simple FTP server, using `vsftpd`.
https://garethflowers.dev/docker-ftp-server/
MIT License
190 stars 50 forks source link

Opening a lot of ports. Why? #75

Open Feriman22 opened 9 months ago

Feriman22 commented 9 months ago

Hi,

There are a lot of ports opened by docker compose (and docker run), specifically these:

- '20-21:20-21/tcp'
- '40000-40009:40000-40009/tcp'

However, to connect to the FTP server, it is sufficient to open TCP port 21. What is the purpose/meaning of the other ports?

Edit: I tested it in bridge network mode, and it works as expected. So only the 21 TCP port is required.

Thanks, Feriman

dnagy commented 8 months ago

They are needed for passive mode. You can take a look at the configuration file for details: https://github.com/garethflowers/docker-ftp-server/blob/main/src/vsftpd.conf If you don't intend to use passive mode, than you don't have to open those ports.

Feriman22 commented 8 months ago

I have created a pull request for that: https://github.com/garethflowers/docker-ftp-server/pull/77