zoukankan      html  css  js  c++  java
  • Centos6 iptables 防火墙设置【转】

    1、指令 vi /etc/sysconfig/iptables

    添加以下内容和要开放的端口

    # Firewall configuration written by system-config-firewall


    # Manual customization of this file is not recommended.
    *filter
    :INPUT ACCEPT [0:0]
    :FORWARD ACCEPT [0:0]
    :OUTPUT ACCEPT [0:0]
    -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
    -A INPUT -p icmp -j ACCEPT
    -A INPUT -i lo -j ACCEPT
    -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
    -A INPUT -m state --state NEW -m tcp -p tcp --dport 8081 -j ACCEPT
    -A INPUT -m state --state NEW -m tcp -p tcp --dport 8083 -j ACCEPT
    -A INPUT -m state --state NEW -m tcp -p tcp --dport 8080 -j ACCEPT
    -A INPUT -m state --state NEW -m tcp -p tcp --dport 8088 -j ACCEPT
    -A INPUT -m state --state NEW -m tcp -p tcp --dport 9000 -j ACCEPT
    -A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT
    -A INPUT -m state --state NEW -m tcp -p tcp --dport 3000 -j ACCEPT
    -A INPUT -m state --state NEW -m tcp -p tcp --dport 3322 -j ACCEPT

    -A INPUT -m state --state NEW -m tcp -p tcp --dport 3690 -j ACCEPT
    -A INPUT -j REJECT --reject-with icmp-host-prohibited
    -A FORWARD -j REJECT --reject-with icmp-host-prohibited
    COMMIT

    ###############保存iptables文件,重启服务###############

    #保存iptables规则
    service iptables save

    #重启iptables服务
    service iptables restart

    svnserve的,默认端口为3690,

  • 相关阅读:
    UIView的clipsToBounds属性,layoutSubViews及触摸事件传递(默认情况下)总结
    ISO中运行时简单使用及KVC补充
    IOS中UISearchBar的使用
    oc的block
    oc的协议(protocol)
    oc的分类category
    oc内存的理解
    oc笔记(转载)
    oc对象中属性总结
    servlet,struts1,struts2,spring
  • 原文地址:https://www.cnblogs.com/richard1015/p/9505817.html
Copyright © 2011-2022 走看看