我按照这里的指南安装 vsftphttps://www.tecmint.com/install-ftp-server-in-rhel-8/
守护进程正在运行:
# systemctl status vsftpd
● vsftpd.service - Vsftpd ftp daemon
Loaded: loaded (/usr/lib/systemd/system/vsftpd.service; enabled; vendor preset: disabled)
Active: active (running) since Wed 2020-01-22 12:33:32 UTC; 5s ago
Process: 11345 ExecStart=/usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf (code=exited, status=0/SUCCESS)
Main PID: 11346 (vsftpd)
Tasks: 1 (limit: 26213)
Memory: 724.0K
CGroup: /system.slice/vsftpd.service
└─11346 /usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf
我已启用 SeLinux 安全布尔值以允许 ftpd_full_access
# sudo getsebool -a | grep ftpd_full_access
ftpd_full_access --> on
我有一个受信任的区域,只能从我们的办公室 VPN IP 地址访问,这些是与其相关的规则和服务:
# firewall-cmd --list-all --zone=trusted
trusted (active)
target: ACCEPT
icmp-block-inversion: no
interfaces:
sources: <my office vpn ip address>
services: ftp mysql ssh
ports: 21/tcp 45073/tcp
protocols:
masquerade: no
forward-ports:
source-ports:
icmp-blocks:
rich rules:
我的 /etc/vsftpd/vsftpd.conf 配置如下所示:
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_std_format=YES
chroot_local_user=YES
listen=YES
listen_ipv6=NO
pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
lock_upload_files=YES
但是我无法从使用 VPN IP 地址的台式机上的 Filezilla 进行连接。
Status: Connecting to nn.nn.nn.nn...
Response: fzSftp started, protocol_version=9
Command: open "[email protected]" 22
Command: Pass: ************
Status: Connected to nn.nn.nn.nn
Error: Connection timed out after 20 seconds of inactivity
Error: Could not connect to server
我可以连接到同一台服务器来获取 ssh 会话。
我肯定是遗漏了什么,但我又不知道是什么。有人能帮忙吗?