如何在以下 IPTables 配置上允许 FTP 连接....
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere ctstate RELATED,ESTABLISHED
ACCEPT tcp -- anywhere anywhere tcp dpt:www
ACCEPT tcp -- anywhere anywhere tcp dpt:https
ACCEPT tcp -- anywhere anywhere tcp dpt:1111
ACCEPT tcp -- anywhere anywhere tcp dpt:ftp
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
DROP all -- anywhere anywhere
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
答案1
这已经涵盖了
尝试
lsmod | grep ftp
modprobe ip_conntrack_ftp
lsmod | grep ftp
第一个命令应该不显示任何内容,第三个命令应该显示类似的内容..
ip_conntrack_ftp 41361 0
ip_conntrack 91621 4 ip_conntrack_ftp,ipt_MASQUERADE,iptable_nat,ip_nat
这有用吗??