全球主机交流论坛
标题:
iptables如何打开ping功能呢?
[打印本页]
作者:
lopkin
时间:
2011-9-7 19:35
标题:
iptables如何打开ping功能呢?
搜索搜到如下的教程:开启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,不知道是什么问题
作者:
lazyzhu
时间:
2011-9-7 19:38
xt_state 模块缺失
作者:
sunshine
时间:
2011-9-7 19:40
提示:
作者被禁止或删除 内容自动屏蔽
作者:
lopkin
时间:
2011-9-7 19:53
标题:
回复 3# sunshine 的帖子
还是不能ping
作者:
lopkin
时间:
2011-9-7 19:54
标题:
回复 2# lazyzhu 的帖子
是需要去安装吗?如何装呢
作者:
sunshine
时间:
2011-9-7 20:02
提示:
作者被禁止或删除 内容自动屏蔽
作者:
lopkin
时间:
2011-9-7 20:05
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
作者:
我是人
时间:
2011-9-7 20:07
次序问题,ACCEPT icmp 要在 REJECT all 之前。
作者:
lopkin
时间:
2011-9-7 20:07
标题:
回复 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上设置的
作者:
ATOM
时间:
2011-9-7 20:08
原帖由
我是人
于 2011-9-7 20:07 发表
次序问题,ACCEPT icmp 要在 REJECT all 之前。
是的ACCEPT接受要在REJECT拒绝之前。
作者:
lazyzhu
时间:
2011-9-7 20:09
vi /etc/sysconfig/iptables
作者:
lopkin
时间:
2011-9-7 20:15
标题:
回复 8# 我是人 的帖子
哦,那就是清空然后再弄,全部弄好后在reject吗?
作者:
我是人
时间:
2011-9-7 20:20
可以用11楼的办法,或者用 --insert / --delete。
改完记得重启iptables。
[
本帖最后由 我是人 于 2011-9-7 20:21 编辑
]
作者:
lopkin
时间:
2011-9-7 20:33
标题:
回复 13# 我是人 的帖子
11楼得不知道怎么改
欢迎光临 全球主机交流论坛 (https://mjj.022333.xyz/)
Powered by Discuz! X3.4