CentOS 6.2 - vsftpd 运行
95.76.44.67 背后的人每天扫描我的 ftp 服务器,我阻止了他使用 iptables,但检查 vsftpd.log 我看到他仍然可以连接到 vsftpd,我不知道为什么。
这是我的 iptables 输出:
Chain INPUT (policy ACCEPT 223K packets, 34M bytes)
num pkts bytes target prot opt in out source destination
1 18709 1370K ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:512
2 43135 2175K ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:21
3 143K 181M ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpts:62222:63333
4 68342 94M ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:25
5 1 44 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:53
6 254K 30M ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:3306
7 8 472 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:465
8 103K 140M ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:587
9 122K 7662K ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:995
10 7486 1039K ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:443
11 1201 114K ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:8080
12 277K 595M ACCEPT all -- lo * 0.0.0.0/0 0.0.0.0/0
13 0 0 DROP all -- * * 70.148.48.200 0.0.0.0/0
14 2015 81956 DROP all -- * * 95.76.44.67 0.0.0.0/0
15 0 0 DROP all -- * * 95.76.133.243 0.0.0.0/0
16 0 0 DROP all -- * * 95.76.186.81 0.0.0.0/0
17 0 0 DROP all -- * * 95.76.102.135 0.0.0.0/0
18 0 0 DROP all -- * * 118.69.198.201 0.0.0.0/0
19 0 0 DROP all -- * * 69.94.28.73 0.0.0.0/0
20 0 0 DROP all -- * * 218.60.44.132 0.0.0.0/0
21 0 0 DROP all -- * * 80.232.232.9 0.0.0.0/0
22 0 0 DROP all -- * * 61.184.196.122 0.0.0.0/0
23 0 0 DROP all -- * * 61.51.18.235 0.0.0.0/0
24 0 0 DROP all -- * * 218.29.115.152 0.0.0.0/0
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
num pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 1287K packets, 1178M bytes)
num pkts bytes target prot opt in out source destination
Run Code Online (Sandbox Code Playgroud)
我能做些什么来阻止他连接到 vsftpd ?
iptables 使用第一条规则来匹配获胜,因此
2 43135 2175K ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:21
Run Code Online (Sandbox Code Playgroud)
允许端口 21 上的连接胜过
14 2015 81956 DROP all -- * * 95.76.44.67 0.0.0.0/0
Run Code Online (Sandbox Code Playgroud)
因为,对于 FTP 连接,它永远不会被执行。
将 95.76.44.67 的 DROP 放在接受 FTP 之前。你可能想改变命令实现这-I ...不是-A ...
| 归档时间: |
|
| 查看次数: |
355 次 |
| 最近记录: |