经过 停止 & 开始 la iptables的我成功了,失去所有连接到ftp:
root@server [~]# service iptables stop
Flushing firewall rules: [ OK ]
Setting chains to policy ACCEPT: mangle filter [ OK ]
Unloading iptables modules: [ OK ]
root@server [~]# service iptables start
Flushing firewall rules: [ OK ]
Setting chains to policy ACCEPT: filter [ OK ]
Unloading iptables modules: [ OK ]
Applying iptables firewall rules: [ OK ]
Loading additional iptables modules: ip_conntrack_netbios_n[ OK ]
后果:[R]数据套接字 Error:连接失败[FTP] 来 / 即将离任,尽管它出现在我登录的服务器上,但我无权访问任何内容。
解:
root@server [~]# iptables -A INPUT -p tcp --dport 21 -j ACCEPT
root@server [~]# modprobe ip_conntrack_ftp
“ /”是您当前的位置;-)