我按照這裡的指南安裝 vsftphttps://www.howtoing.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.confconf 如下圖所示:
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 會話。
我一定是錯過了什麼,但我看不到是什麼。有人可以幫忙嗎?