我从 IPTables 中删除了一些不再需要的内容,现在我的 SFTP 在尝试连接 FileZilla 时超时:
Status: Connecting to ###.93.110.###...
Response: fzSftp started, protocol_version=3
Command: open "root@###.93.110.###" 22
Error: Connection timed out after 20 seconds of inactivity
Error: Could not connect to server
IP表:
iptables -L -n --line-numbers
Chain INPUT (policy DROP)
num target prot opt source destination
1 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:22
2 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:5431
3 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
4 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:8080
5 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:25565
6 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:80
7 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:443
8 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:22
9 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:25999
10 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:4000
11 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:4001
12 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:4005
13 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:115
14 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:22
Chain FORWARD (policy ACCEPT)
num target prot opt source destination
Chain OUTPUT (policy ACCEPT)
num target prot opt source destination
答案1
您在三处允许端口 22(SSH),即第 1、8 和 14 行。
端口 22 是正确的端口,SSH/SCP 服务正在运行吗?当您“telnet ###.93.110.### 22”时,您是否收到响应?