全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 6669|回复: 13
打印 上一主题 下一主题

iptables如何打开ping功能呢?

[复制链接]
跳转到指定楼层
1#
发表于 2011-9-7 19:35:33 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
搜索搜到如下的教程:开启ping iptables -D INPUT  -p icmp  -m state --state ESTABLISHED,RELATED -j ACCEPT iptables -D INPUT  -i eth0 -p icmp -j DROP,可是输入后出现这样的提示:iptables: No chain/target/match by that name,不知道是什么问题
2#
发表于 2011-9-7 19:38:05 | 只看该作者
xt_state 模块缺失
sunshine 该用户已被删除
3#
发表于 2011-9-7 19:40:11 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
4#
 楼主| 发表于 2011-9-7 19:53:49 | 只看该作者

回复 3# sunshine 的帖子

还是不能ping
5#
 楼主| 发表于 2011-9-7 19:54:20 | 只看该作者

回复 2# lazyzhu 的帖子

是需要去安装吗?如何装呢
sunshine 该用户已被删除
6#
发表于 2011-9-7 20:02:19 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
7#
 楼主| 发表于 2011-9-7 20:05:46 | 只看该作者
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     all  --  localhost.localdomain  localhost.localdomain
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTAB                                                                                                 LISHED
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:ssh
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:http
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:ftp
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:ftp-data
REJECT     all  --  anywhere             anywhere            reject-with icmp-po                                                                                                 rt-unreachable
ACCEPT     icmp --  anywhere             anywhere            icmp echo-reply
ACCEPT     icmp --  anywhere             anywhere            icmp destination-un                                                                                                 reachable
ACCEPT     icmp --  anywhere             anywhere            icmp time-exceeded
ACCEPT     udp  --  60.195.249.83        anywhere            udp dpt:snmp
ACCEPT     udp  --  60.195.252.107       anywhere            udp dpt:snmp
ACCEPT     udp  --  60.195.252.110       anywhere            udp dpt:snmp

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
REJECT     all  --  anywhere             anywhere            reject-with icmp-po                                                                                                 rt-unreachable
REJECT     all  --  anywhere             anywhere            reject-with icmp-po                                                                                                 rt-unreachable

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere
8#
发表于 2011-9-7 20:07:12 | 只看该作者
次序问题,ACCEPT icmp 要在 REJECT all 之前。
9#
 楼主| 发表于 2011-9-7 20:07:40 | 只看该作者

回复 6# sunshine 的帖子

Chain INPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     all  --  localhost.localdomain  localhost.localdomain
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTAB                                                                                                 LISHED
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:ssh
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:http
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:ftp
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:ftp-data
REJECT     all  --  anywhere             anywhere            reject-with icmp-po                                                                                                 rt-unreachable
ACCEPT     icmp --  anywhere             anywhere            icmp echo-reply
ACCEPT     icmp --  anywhere             anywhere            icmp destination-un                                                                                                 reachable
ACCEPT     icmp --  anywhere             anywhere            icmp time-exceeded
ACCEPT     udp  --  60.195.249.83        anywhere            udp dpt:snmp
ACCEPT     udp  --  60.195.252.107       anywhere            udp dpt:snmp
ACCEPT     udp  --  60.195.252.110       anywhere            udp dpt:snmp

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
REJECT     all  --  anywhere             anywhere            reject-with icmp-po                                                                                                 rt-unreachable
REJECT     all  --  anywhere             anywhere            reject-with icmp-po                                                                                                 rt-unreachable

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere

按照vpser上设置的
10#
发表于 2011-9-7 20:08:42 | 只看该作者
原帖由 我是人 于 2011-9-7 20:07 发表
次序问题,ACCEPT icmp 要在 REJECT all 之前。

是的ACCEPT接受要在REJECT拒绝之前。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2026-1-9 08:25 , Processed in 0.077051 second(s), 11 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表