使用iptables -S命令查看链中的规则
来源:互联网 发布:java 布尔类型 编辑:程序博客网 时间:2024/05/17 18:41
手册
#man iptables
-S, --list-rules [chain]
Print all rules in the selected chain. If no chain is selected, all chains are printed like iptables-save. Like
every other iptables command, it applies to the specified table (filter is the default).
使用 -S 命令可以查看这些rules是如何建立的
示例
Fedora18中防火墙filter表的规则
# iptables -S-P INPUT ACCEPT-P FORWARD ACCEPT-P OUTPUT ACCEPT-N FORWARD_IN_ZONES-N FORWARD_OUT_ZONES-N FORWARD_direct-N FWDI_ZONE_home-N FWDI_ZONE_home_allow-N FWDI_ZONE_home_deny-N FWDI_ZONE_public-N FWDI_ZONE_public_allow-N FWDI_ZONE_public_deny-N FWDO_ZONE_external-N FWDO_ZONE_external_allow-N FWDO_ZONE_external_deny-N FWDO_ZONE_home-N FWDO_ZONE_home_allow-N FWDO_ZONE_home_deny-N FWDO_ZONE_public-N FWDO_ZONE_public_allow-N FWDO_ZONE_public_deny-N INPUT_ZONES-N INPUT_direct-N IN_ZONE_dmz-N IN_ZONE_dmz_allow-N IN_ZONE_dmz_deny-N IN_ZONE_external-N IN_ZONE_external_allow-N IN_ZONE_external_deny-N IN_ZONE_home-N IN_ZONE_home_allow-N IN_ZONE_home_deny-N IN_ZONE_internal-N IN_ZONE_internal_allow-N IN_ZONE_internal_deny-N IN_ZONE_public-N IN_ZONE_public_allow-N IN_ZONE_public_deny-N IN_ZONE_work-N IN_ZONE_work_allow-N IN_ZONE_work_deny-N OUTPUT_direct-A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT-A INPUT -i lo -j ACCEPT-A INPUT -j INPUT_direct-A INPUT -j INPUT_ZONES-A INPUT -p icmp -j ACCEPT-A INPUT -j REJECT --reject-with icmp-host-prohibited-A FORWARD -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT-A FORWARD -i lo -j ACCEPT-A FORWARD -j FORWARD_direct-A FORWARD -j FORWARD_IN_ZONES-A FORWARD -j FORWARD_OUT_ZONES-A FORWARD -p icmp -j ACCEPT-A FORWARD -j REJECT --reject-with icmp-host-prohibited-A OUTPUT -j OUTPUT_direct-A FORWARD_IN_ZONES -i p5p1 -g FWDI_ZONE_public-A FORWARD_IN_ZONES -g FWDI_ZONE_public-A FORWARD_OUT_ZONES -o p5p1 -g FWDO_ZONE_public-A FORWARD_OUT_ZONES -g FWDO_ZONE_public-A FWDI_ZONE_home -j FWDI_ZONE_home_deny-A FWDI_ZONE_home -j FWDI_ZONE_home_allow-A FWDI_ZONE_public -j FWDI_ZONE_public_deny-A FWDI_ZONE_public -j FWDI_ZONE_public_allow-A FWDO_ZONE_external -j FWDO_ZONE_external_deny-A FWDO_ZONE_external -j FWDO_ZONE_external_allow-A FWDO_ZONE_external_allow -j ACCEPT-A FWDO_ZONE_home -j FWDO_ZONE_home_deny-A FWDO_ZONE_home -j FWDO_ZONE_home_allow-A FWDO_ZONE_public -j FWDO_ZONE_public_deny-A FWDO_ZONE_public -j FWDO_ZONE_public_allow-A INPUT_ZONES -i p5p1 -g IN_ZONE_public-A INPUT_ZONES -g IN_ZONE_public-A IN_ZONE_dmz -j IN_ZONE_dmz_deny-A IN_ZONE_dmz -j IN_ZONE_dmz_allow-A IN_ZONE_dmz_allow -p tcp -m tcp --dport 22 -m conntrack --ctstate NEW -j ACCEPT-A IN_ZONE_external -j IN_ZONE_external_deny-A IN_ZONE_external -j IN_ZONE_external_allow-A IN_ZONE_external_allow -p tcp -m tcp --dport 22 -m conntrack --ctstate NEW -j ACCEPT-A IN_ZONE_home -j IN_ZONE_home_deny-A IN_ZONE_home -j IN_ZONE_home_allow-A IN_ZONE_home_allow -p tcp -m tcp --dport 22 -m conntrack --ctstate NEW -j ACCEPT-A IN_ZONE_home_allow -p udp -m udp --dport 631 -m conntrack --ctstate NEW -j ACCEPT-A IN_ZONE_home_allow -d 224.0.0.251/32 -p udp -m udp --dport 5353 -m conntrack --ctstate NEW -j ACCEPT-A IN_ZONE_home_allow -p udp -m udp --dport 137 -m conntrack --ctstate NEW -j ACCEPT-A IN_ZONE_home_allow -p udp -m udp --dport 138 -m conntrack --ctstate NEW -j ACCEPT-A IN_ZONE_internal -j IN_ZONE_internal_deny-A IN_ZONE_internal -j IN_ZONE_internal_allow-A IN_ZONE_internal_allow -p tcp -m tcp --dport 22 -m conntrack --ctstate NEW -j ACCEPT-A IN_ZONE_internal_allow -p udp -m udp --dport 631 -m conntrack --ctstate NEW -j ACCEPT-A IN_ZONE_internal_allow -d 224.0.0.251/32 -p udp -m udp --dport 5353 -m conntrack --ctstate NEW -j ACCEPT-A IN_ZONE_internal_allow -p udp -m udp --dport 137 -m conntrack --ctstate NEW -j ACCEPT-A IN_ZONE_internal_allow -p udp -m udp --dport 138 -m conntrack --ctstate NEW -j ACCEPT-A IN_ZONE_public -j IN_ZONE_public_deny-A IN_ZONE_public -j IN_ZONE_public_allow-A IN_ZONE_public_allow -p tcp -m tcp --dport 22 -m conntrack --ctstate NEW -j ACCEPT-A IN_ZONE_public_allow -d 224.0.0.251/32 -p udp -m udp --dport 5353 -m conntrack --ctstate NEW -j ACCEPT-A IN_ZONE_work -j IN_ZONE_work_deny-A IN_ZONE_work -j IN_ZONE_work_allow-A IN_ZONE_work_allow -p tcp -m tcp --dport 22 -m conntrack --ctstate NEW -j ACCEPT-A IN_ZONE_work_allow -d 224.0.0.251/32 -p udp -m udp --dport 5353 -m conntrack --ctstate NEW -j ACCEPT-A IN_ZONE_work_allow -p udp -m udp --dport 631 -m conntrack --ctstate NEW -j ACCEPT
查看nat表
# iptables -t nat -S-P PREROUTING ACCEPT-P INPUT ACCEPT-P OUTPUT ACCEPT-P POSTROUTING ACCEPT-N OUTPUT_direct-N POSTROUTING_ZONES-N POSTROUTING_direct-N POST_ZONE_external-N POST_ZONE_external_allow-N POST_ZONE_external_deny-N POST_ZONE_home-N POST_ZONE_home_allow-N POST_ZONE_home_deny-N POST_ZONE_public-N POST_ZONE_public_allow-N POST_ZONE_public_deny-N PREROUTING_ZONES-N PREROUTING_direct-N PRE_ZONE_home-N PRE_ZONE_home_allow-N PRE_ZONE_home_deny-N PRE_ZONE_public-N PRE_ZONE_public_allow-N PRE_ZONE_public_deny-A PREROUTING -j PREROUTING_direct-A PREROUTING -j PREROUTING_ZONES-A OUTPUT -j OUTPUT_direct-A POSTROUTING -j POSTROUTING_direct-A POSTROUTING -j POSTROUTING_ZONES-A POSTROUTING_ZONES -o p5p1 -g POST_ZONE_public-A POSTROUTING_ZONES -g POST_ZONE_public-A POST_ZONE_external -j POST_ZONE_external_deny-A POST_ZONE_external -j POST_ZONE_external_allow-A POST_ZONE_external_allow -j MASQUERADE-A POST_ZONE_home -j POST_ZONE_home_deny-A POST_ZONE_home -j POST_ZONE_home_allow-A POST_ZONE_public -j POST_ZONE_public_deny-A POST_ZONE_public -j POST_ZONE_public_allow-A PREROUTING_ZONES -i p5p1 -g PRE_ZONE_public-A PREROUTING_ZONES -g PRE_ZONE_public-A PRE_ZONE_home -j PRE_ZONE_home_deny-A PRE_ZONE_home -j PRE_ZONE_home_allow-A PRE_ZONE_public -j PRE_ZONE_public_deny-A PRE_ZONE_public -j PRE_ZONE_public_allow
- 使用iptables -S命令查看链中的规则
- 关于centos6.5的防火墙规则使用--iptables命令
- 使用iptables-persistent持久化iptables规则
- 增加、删除、查看防火墙iptables转发规则
- iptables规则的查看和清除
- Iptables防火墙规则使用梳理
- Iptables 命令使用举例
- Iptables 命令使用举例
- iptables命令的使用
- iptables 一些使用命令
- iptables命令使用实例
- iptables建立规则和链
- iptables规则链执行顺序
- iptables规则链执行顺序
- linux开启端口命令 iptables 打开 查看
- linux开启端口命令 iptables 打开 查看
- linux fuser命令 查看使用中的进程
- linux fuser命令 查看使用中的进程
- 【转】运行游戏时出现0xc000007b错误的解决方法
- ics_cubieboard(A)相对 ics_cubieboard-tv-sdk(B) framework/base差异
- 第三章 Libgdx必备工具
- 程序员_Java高新技术<一>
- Servlet学习笔记1之通过实现Servlet接口开发一个HelloServ
- 使用iptables -S命令查看链中的规则
- Nginx反向代理以及配置优化
- Comfusion 4.1 发布,桌面 Linux 发行
- 服务安装
- 新学java
- HDU 1083 二分匹配 Courses
- Unix/Linux开源世界资源链接汇总
- VBS监控CPU的使用率(如占用率一直维持在80%超过30秒则运行某程序)
- 多个委托方法的顺序执行