FubarDevelopment / FtpServer

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

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

Closed Adwa0428 closed 2 years ago

Adwa0428 commented 2 years 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 2 years ago

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

Adwa0428 commented 2 years ago

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