CentOS7下vsftpd over SSL/TLS加密传输配置实践

简介: CentOS7下vsftpd over SSL/TLS加密传输配置实践

640.jpg

之前有介绍过CentOS下搭建vsftpd服务器,可以参考如下文章


CentOS7下搭建vsftpd服务器(本地用户模式)

下面开启SSL/TLS用于FTP安全加密传输


1、生成自签证书


cd /etc/pki/tls/certs/
openssl req -x509 -nodes -newkey rsa:2048 -keyout vsftpd.pem -out vsftpd.pem -days 365
[root@VM_Server ~]# cd /etc/pki/tls/certs/
[root@VM_Server certs]# ll
total 12
lrwxrwxrwx. 1 root root   49 Jan  4  2020 ca-bundle.crt -> /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem
lrwxrwxrwx. 1 root root   55 Jan  4  2020 ca-bundle.trust.crt -> /etc/pki/ca-trust/extracted/openssl/ca-bundle.trust.crt
-rwxr-xr-x. 1 root root  610 Oct 31  2018 make-dummy-cert
-rw-r--r--. 1 root root 2516 Oct 31  2018 Makefile
-rwxr-xr-x. 1 root root  829 Oct 31  2018 renew-dummy-cert
[root@VM_Server certs]# openssl req -x509 -nodes -newkey rsa:2048 -keyout vsftpd.pem -out vsftpd.pem -days 365 
Generating a 2048 bit RSA private key
................+++
...........................+++
writing new private key to 'vsftpd.pem'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [XX]:CN
State or Province Name (full name) []:ZheJiang
Locality Name (eg, city) [Default City]:HangZhou      
Organization Name (eg, company) [Default Company Ltd]:WalkingCloud
Organizational Unit Name (eg, section) []:IT
Common Name (eg, your name or your server's hostname) []:ftp.walkingcloud.cn
Email Address []:yuanfan@walkingcloud.cn
[root@VM_Server certs]# ll
total 16
lrwxrwxrwx. 1 root root   49 Jan  4  2020 ca-bundle.crt -> /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem
lrwxrwxrwx. 1 root root   55 Jan  4  2020 ca-bundle.trust.crt -> /etc/pki/ca-trust/extracted/openssl/ca-bundle.trust.crt
-rwxr-xr-x. 1 root root  610 Oct 31  2018 make-dummy-cert
-rw-r--r--. 1 root root 2516 Oct 31  2018 Makefile
-rwxr-xr-x. 1 root root  829 Oct 31  2018 renew-dummy-cert
-rw-r--r--  1 root root 3176 Aug  8 09:01 vsftpd.pem

640.png

然后拷贝证书


cd /etc/vsftpd/
cp /etc/pki/tls/certs/vsftpd.pem ./
chmod 600 vsftpd.pem


640.png

2、配置vsftpd.conf


vi /etc/vsftpd/vsftpd.conf 添加如下参数


# enable TLS
rsa_cert_file=/etc/vsftpd/vsftpd.pem
ssl_enable=YES
ssl_ciphers=HIGH
ssl_tlsv1=YES
ssl_sslv2=NO
ssl_sslv3=NO
force_local_data_ssl=YES
force_local_logins_ssl=YES

640.png


3、重启vsftpd服务,安装lftp客户端工具测试


service vsftpd restart
yum install -y lftp
lftp -u yuanfan 192.168.31.80


640.png

640.png

640.png


4、windows下使用Filezilla FTP客户端连接

640.png

640.png

640.png

相关文章
|
安全 算法 网络协议
解析:HTTPS通过SSL/TLS证书加密的原理与逻辑
HTTPS通过SSL/TLS证书加密,结合对称与非对称加密及数字证书验证实现安全通信。首先,服务器发送含公钥的数字证书,客户端验证其合法性后生成随机数并用公钥加密发送给服务器,双方据此生成相同的对称密钥。后续通信使用对称加密确保高效性和安全性。同时,数字证书验证服务器身份,防止中间人攻击;哈希算法和数字签名确保数据完整性,防止篡改。整个流程保障了身份认证、数据加密和完整性保护。
|
安全 网络安全 数据安全/隐私保护
SSL/TLS证书**是一种用于加密网络通信的数字证书
SSL/TLS证书**是一种用于加密网络通信的数字证书
903 6
|
Ubuntu 安全 网络安全
在Ubuntu系统下使用vsftpd配置FTP服务器的步骤
以上就是在Ubuntu系统下使用vsftpd配置FTP服务器的步骤。这些步骤都是基础的,但足够让你建立一个简单的FTP服务器。如果你需要更高级的功能,例如SSL加密、虚拟用户等,你可能需要进一步研究vsftpd的配置选项。
1044 13
|
安全 算法 网络安全
SSL/TLS:构建数字世界的加密长城
**协议演进:从网景实验室到全球标准** 1994年,网景公司推出SSL协议,首次实现40位密钥加密传输,开启网络安全新纪元。此后,SSL 3.0、TLS 1.0相继问世,至2018年TLS 1.3将握手速度提升60%,强制前向加密确保历史会话安全。TLS协议通过非对称加密、对称加密和证书信任链等多层架构保障通信安全。2014年POODLE漏洞促使全行业禁用SSL 3.0,催生防降级机制。
|
安全 搜索推荐 网络安全
免费SSL证书:一键加密,守护网站安全
在互联网时代,网站安全至关重要。SSL证书是保护网站数据传输安全的核心工具,提供数据加密、提升信任度、提高搜索引擎排名及避免“不安全”警告等多重优势。现在,您可以通过JoySSL官网免费获取SSL证书,只需注册并填写注策码(230907),即可一键加密,轻松守护网站安全,提升用户体验和品牌形象。立即行动,为您的网站穿上“安全防护衣”!
764 11
|
安全 算法 物联网
SSL/TLS:互联网通信的加密基石与安全实践
**简介:** 在数字化时代,互联网每天传输海量敏感数据,网络攻击频发。SSL/TLS协议作为网络安全的基石,通过加密技术确保数据安全传输。本文解析SSL/TLS的技术架构、密码学原理、应用场景及常见误区,探讨其在未来的发展趋势,强调持续演进以应对新型威胁的重要性。 SSL/TLS不仅保障Web安全,还广泛应用于API、邮件、物联网等领域,并遵循合规标准如PCI DSS和GDPR。
|
安全 网络协议 网络安全
【Azure 环境】从网络包中分析出TLS加密套件信息
An TLS 1.2 connection request was received from a remote client application, but non of the cipher suites supported by the client application are supported by the server. The connection request has failed. 从远程客户端应用程序收到 TLS 1.2 连接请求,但服务器不支持客户端应用程序支持的任何密码套件。连接请求失败。
750 2
|
运维 安全 专有云
专有云CentOS迁移替换实践分享|飞天技术沙龙-CentOS迁移替换专场
本次方案的主题是专有云CentOS迁移替换实践分享 ,围绕用户上云/迁云、自动化迁移管理平台技术开发以及 OS 迁移产品化流程等方面展开详细介绍。得益于操作系统团队提供的技术优化能力,以及成熟的迁移技术工具,阿里云和龙蜥社区为用户提供成熟和稳定的迁移方案,帮助大家从 CentOS 7/8 迁移到 Alibaba Cloud Linux /Anolis OS。 1. 专有云一站式迁云服务 2. OS 迁移产品化流程 3. 客户案例
314 0
|
安全 算法 网络协议
【网络原理】——图解HTTPS如何加密(通俗简单易懂)
HTTPS加密过程,明文,密文,密钥,对称加密,非对称加密,公钥和私钥,证书加密