admin管理员组文章数量:1635678
最近局域网ping局域网的Ubuntu麒麟系统发现了这个错误,猜测是防火墙造成的,经过一番操作(下文详述),最终成功解决问题。
网上看到了不少Linux下如何关闭防火墙,无奈我使用的是基于Ubuntu的麒麟系统,文章中提到的方法基本都无法使用,各种服务不存在,文件不存在错误,直到找到了这篇文章《Destination Host Prohibited》,无奈我这个系统使用了--list命令也不显示行号,如何才能实现删除相关规则呢?
在另外一篇文章中找到了一个备份和恢复的命令,于是看到了希望!
[root@localhost ben.liu]# iptables-save > /etc/sysconfig/iptables.bak
[root@localhost ben.liu]# iptables -F INPUT
[root@localhost ben.liu]# service iptables status
Table: filter
Chain INPUT (policy ACCEPT)
num target prot opt source destination
Chain FORWARD (policy ACCEPT)
num target prot opt source destination
1 REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited
Chain OUTPUT (policy ACCEPT)
num target prot opt source destination
恢复以前保存的记录:
[root@localhost ben.liu]# iptables-restore /etc/sysconfig/iptables.bak
1.首先使用
iptables-save /home/greatwall/iptables.bak
命令保存防火墙规则。
2.备份导出的文件,修改文件内容,只要有
reject-with icmp-host-prohibited
的行,全部删除!
3.使用
iptables-restore /home/greatwall/iptables.bak
命令恢复防火墙规则。
4.使用iptables -L命令查看当前规则,确认无
reject-with icmp-host-prohibited
5. 测试ping
本文标签: 防火墙UbuntudestinationProhibitedHost
版权声明:本文标题:Ubuntu关闭防火墙Destination Host Prohibited 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://www.elefans.com/dianzi/1729214129a1190218.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论