FTP / SFTP Server 的端口转发

需要开放的端口

21TCPFTP control channel. Plain-text — should be avoided.
22TCPSFTP / SSH — strongly recommended over plain FTP.

为什么需要端口转发?

Hosting a file-drop or media-sync endpoint from home historically used FTP — but SFTP (over SSH/22) is dramatically safer and easier to configure with most modern routers and clients.

按路由器品牌逐步操作

TP-Link
  1. Assign a static LAN IP to the SFTP server
  2. NAT Forwarding → forward 22 TCP to that IP (change external port to e.g. 22022 to hide from scanners)
  3. Set up SSH key authentication; disable password login server-side
Netgear
  1. Port Forwarding → forward TCP 22 (or a custom external port) → server LAN IP
  2. Consider Netgear ReadyNAS file-share if you already have one — it has SFTP built-in
ASUS
  1. ASUS routers with USB can host an FTP/SFTP server directly (AiCloud)
  2. WAN → AiCloud → enable FTP / Samba sharing on the connected USB drive

安全警告

Plain FTP (21) leaks credentials and data. Always prefer SFTP. Disable root login over SSH, use keys, and run fail2ban or sshguard.

相关指南

安全提示

正在使用默认密码?使用 NordVPN 加密保护您的网络。