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,

  • 相关阅读:
    PHP中的类函数和类对象
    PHP魔术方法__clone()篇
    PHP魔术方法__tostring()篇
    PHP魔术方法__call()篇
    自己写的PHP的mql类
    PHP的分页
    ThinkPHP的调用css,js和图片的路径
    JavaScript作用域链
    在Eclipse中开发WEB项目
    eclipse官方网址、各个版本的下载
  • 原文地址:https://www.cnblogs.com/richard1015/p/9505817.html
Copyright © 2011-2022 走看看