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,

  • 相关阅读:
    获取用户登录次数(cookie)
    漂亮的 Checkbox and Radio (jQuery)
    FancyUpload3.0
    UI upload 多文件上传
    js 匿名函数 闭包
    c# 图片插入Excel
    sql查询优化 索引优化
    GridViewAddUpdateDelete_Ajax with jquery.blockUI
    动态自动搜索 Dynamic search (js版)
    master.dbo.spt_values
  • 原文地址:https://www.cnblogs.com/richard1015/p/9505817.html
Copyright © 2011-2022 走看看