|
|
我得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
则无法连接
请问大侠们,这个错误出现的原因是什么
怎么设置才能解决 |
|