zoukankan      html  css  js  c++  java
  • ipables常用命令

    //命令结构
    iptables -t TABLE - 操作方式 规则条件
    示例:
    1.1列出filter表所有内容:
    iptables -t filter -L  红色框内为默认路由,及无法匹配到任何一条规则时采用的策略

    1.2列出filter表INPUT链内容:
    iptables -t filter -L INPUT

    1.3 清除filter表所有内容
    iptables -t filter -F

    1.4 将规则添加到filter表的input链中
    iptables -t filter -A INPUT -p ICMP -j ACCEPT

     

    1.5 将forword链的默认策略设置为DROP
    iptables -t filter -P FORWORD DROP

    1.6 在INPUT链中插入新规则
    iptables -t filter -I INPUT 2 -p tcp -j ACCEPT

    注意:在-L参数后面加上-line-number 会显示行号

    1.7 取代INPUT链已经存在的规则

    iptables -t filter -R INPUT 2 -p icmp -j ACCEPT

    1.8 删除INPUT链中已经存在的规则

    iptables -t filter -D INPUT 2

     2 nat表的操作

     

    3 mangle表的操作

     

     

     3 raw表的操作

     

  • 相关阅读:
    JSP介绍
    Cookie和Session的原理及异同
    过滤器的使用
    JAVA 集合
    **JVM** 类加载机制
    *JAVA IO/NIO*
    jvm
    ioc
    spring问题总结
    aop详解
  • 原文地址:https://www.cnblogs.com/anitaguangzi/p/13561834.html
Copyright © 2011-2022 走看看