linux下IPTABLES配置详解
来源:互联网 发布:淘宝店铺介绍怎么写 编辑:程序博客网 时间:2024/05/19 22:28
如果你的IPTABLES基础知识还不了解,建议先去看看:《Iptables静态防火墙基础教程》
开始配置
我们来配置一个filter表的防火墙.
(1)查看本机关于IPTABLES的设置情况
[root@tp ~]# iptables -L -n
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain INPUT (policy ACCEPT)
target
Chain FORWARD (policy ACCEPT)
target prot opt source destination
target
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
target
Chain RH-Firewall-1-INPUT (0 references)
target prot opt source destination
ACCEPT all — 0.0.0.0/0 0.0.0.0/0
ACCEPT icmp — 0.0.0.0/0 0.0.0.0/0 icmp type 255
ACCEPT esp — 0.0.0.0/0 0.0.0.0/0
ACCEPT ah — 0.0.0.0/0 0.0.0.0/0
ACCEPT udp — 0.0.0.0/0 224.0.0.251 udp dpt:5353
ACCEPT udp — 0.0.0.0/0 0.0.0.0/0 udp dpt:631
ACCEPT
target
ACCEPT
ACCEPT
ACCEPT
ACCEPT
ACCEPT
ACCEPT
ACCEPT