zoukankan      html  css  js  c++  java
  • Linux (centos7) 防火墙命令

    防火墙配置

    CentOS 7默认使用的是firewall作为防火墙,这里改为iptables防火墙。

    firewall操作:

    # service firewalld status; #查看防火墙状态

     (disabled 表明 已经禁止开启启动 enable 表示开机自启,inactive 表示防火墙关闭状态 activated(running)表示为开启状态)

    # service firewalld start;  或者 #systemctl start firewalld.service;#开启防火墙

    # service firewalld stop;  或者 #systemctl stop firewalld.service;#关闭防火墙

    # service firewalld restart;  或者 #systemctl restart firewalld.service;  #重启防火墙

    # systemctl disable firewalld.service#禁止防火墙开启自启

    # systemctl enable firewalld#设置防火墙开机启动

    #yum remove firewalld#卸载firewall

    安装iptables防火墙及操作:

    #yum install iptables-services#安装iptables防火墙

    #vi /etc/sysconfig/iptables#编辑防火墙配置文件,开放3306端口

       添加配置:-A INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT

    #systemctl restart iptables.service #最后重启防火墙使配置生效

    #systemctl enable iptables.service #设置防火墙开机启动

     
  • 相关阅读:
    强大的C#图形处理组件
    Spring整合Mybatis的注意事项
    Umbraco常见陷阱与错误模式
    Umbraco 官网阅读理解
    Umbraco模型默认属性
    无缝隙滚动跑马灯组件
    这才是正确删除 office 的方式
    SVN利用Hooks自动发布网站
    Umbraco安装权限问题
    EPiServer网文
  • 原文地址:https://www.cnblogs.com/mabingxue/p/8724633.html
Copyright © 2011-2022 走看看