zoukankan      html  css  js  c++  java
  • Linux-iptables

    表链关系

    filter,nat,mangle每个表可以包含多个链(chain)。每个链可以包含多条规则(role)。iptables主要针对表(table),链(chain),规则(role)进行管理。

    iptable预定了5个链,input output forward prerouting postrouting.

    nat表:此规则表针对prerouting和postrouting两个规则链。

    mangle表:此规则表针对prerouting,forward和postrouting三个规则链。

    filter表:此规则表针对input,output和forward三个规则链。

    example 1:

    iptables -t filter -A forward -s x.x.x.x/x -j DROP

    解释:-t filter 是指定作用域filter表,-A表示新增规则,-s 指定网断,-j 是指定动作

    example 2:

    iptables -nL

    解释:要查看某表下的各个链的信息,默认是filter表

  • 相关阅读:
    适配器模式
    事务
    JUnit4
    命令模式
    组合模式
    MySQL语法
    MyEclipse工具
    数据源和连接池
    Annotation
    Java反射机制
  • 原文地址:https://www.cnblogs.com/mirrorlake/p/8136938.html
Copyright © 2011-2022 走看看