由 phoenixfight 在 06-04-2004 12:39 发表:
请问一个关于iptables本机回访的设置问题
我得iptables设置如下
###-----------------------------------------------------###
允许外部主机 ssh port 22
###-----------------------------------------------------###
iptables -A INPUT -p tcp -i eth0 --dport 22 -j ACCEPT
###-----------------------------------------------------###
允许访问外部主机 ssh port 22
###-----------------------------------------------------###
iptables -A INPUT -p tcp ! --syn -s any/0 --sport 22 --dport 1024:65535 -j ACCEPT
#编辑默认数据接入链不能通过
iptables -P INPUT DROP
这样的话,别的机器可以ssh本机
本机也可以ssh别的机器
可是当使用
ssh root@localhost
则无法连接
请问大侠们,这个错误出现的原因是什么
怎么设置才能解决
由 phoenixfight