FubarDevelopment / FtpServer

Portable FTP server written in .NET
http://fubardevelopment.github.io/FtpServer/
MIT License
472 stars 161 forks source link

How to reject non-encrypted connections when I use the TLS function? #142

Closed Adwa0428 closed 1 year ago

Adwa0428 commented 1 year ago

Hi, I set the FTPS server as the example:

var cert = new X509Certificate2("my.pfx", "my-super-strong-password-that-nobody-knows"); services.Configure(cfg => cfg.ServerCertificate = cert);

The FTP server allows to create TLS connections via FTP clients. But it still allows to create non-encrupted connections. How could I set to reject non-encrypted connections, and only allow TLS connections? Thanks.

fubar-coder commented 1 year ago

You can try to use implicit TLS, which means that every connection must be encrypted from the start.

Adwa0428 commented 1 year ago

I tried to use implicit TLS and it works fine. Thanks for you great help!