`

Centos7 防火墙设置

阅读更多
Centos7 关闭防火墙

CentOS 7.0默认使用的是firewall作为防火墙,使用iptables必须重新设置一下

1、直接关闭防火墙

systemctl stop firewalld.service #停止firewall

systemctl disable firewalld.service #禁止firewall开机启动

2、设置 iptables service

yum -y install iptables-services

如果要修改防火墙配置,如增加防火墙端口3306

vi /etc/sysconfig/iptables

增加规则

-A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT

保存退出后

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

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

最后重启系统使设置生效即可。
分享到:
评论

相关推荐

    CentOS7防火墙设置

    CentOS 7 防火墙设置 CentOS 7 防火墙设置是 Linux 操作系统中的一项重要安全配置。在 CentOS 7 中,默认使用的是 firewall 防火墙,但是很多用户更倾向于使用传统的 iptables 防火墙。本文将指导您如何关闭默认...

    CentOS7下Firewall防火墙配置用法详解(推荐)

    centos 7中防火墙是一个非常的强大的功能了,这篇文章主要介绍了CentOS7下Firewall防火墙配置用法详解(推荐),小编觉得挺不错的,现在分享给大家,也给大家做个参考。

    Centos7防火墙配置手册

    防火墙配置及相关说明centos 7中防火墙是一个非常的强大的功能了,但对于centos 7中在防火墙中进行了升级了,下面我们一起来详细的看看关于centos 7中防火墙使用方法。 FirewallD 提供了支持网络/防火墙区域(zone)...

    CentOS7防火墙配置文件

    CentOS7防火墙的启动、停止和禁用配置命令。 包括安装、重启、开启/移除端口并添加规则等相关操作命令。

    CentOS7 Docker防火墙的简单配置教程

    CentOS7 Docker防火墙的简单配置 禁用 firewalld 服务 systemctl disable firewalld systemctl stop firewalld 安装 iptables 防火墙服务 yum install iptables-services 创建 iptables 配置脚本 cat >> /usr/...

    防火墙白名单设置方法_iptables_centos6

    防火墙白名单设置方法_iptables_centos6 防火墙白名单设置方法_iptables_centos6 防火墙白名单设置方法_iptables_centos6

    CentOS 配置防火墙操作实例

    linux CentOS 6 配置防火墙操作实例

    防火墙白名单设置方法_firewalld_centos7.pdf

    为firewall设置访问白名单,仅允许合法的ip访问特定端口,如下以9089端口以及5672端口为例

    Centos7防火墙firewalld探究与使用.pdf

    Centos7防火墙firewalld探究与使用.pdf 更多资源请点击:https://blog.csdn.net/weixin_44155966

    CentOS 7-防火墙的配置

    CentOS 7-防火墙的配置

    centos设置防火墙方法

    centos设置防火墙方法

    Centos7防火墙命令

    centos 7 防火墙命令,firewall+iptables..........................................................................................................................................

    详解CentOS7防火墙管理firewalld

    本篇文章主要介绍了CentOS7防火墙管理firewalld,centos 7中防火墙是一个非常的强大的功能了,有兴趣的可以了解一下。

    在centos防火墙内禁止某IP的访问.docx

    在centos防火墙内禁止某IP的访问.docx

    CentOS 7.0防火墙操作

    最新CentOS 7.0防火墙操作命令和以前稍微有些区别和变化

    linux之centos7防火墙基本使用详解

    2.systemctl是CentOS7的服务管理工具中主要的工具,它融合之前service和chkconfig的功能于一体。 启动防火墙: systemctl start firewalld.service 关闭防火墙: systemctl stop firewalld.service 重启防火墙: ...

    CentOS防火墙学习教程

    CentOS 防火墙学习教程主要介绍了 CentOS 7 中的防火墙设置,包括查看防火墙状态、关闭防火墙、查看端口状态、开启端口、删除端口、批量添加或删除端口等操作。 防火墙状态查看:使用 `systemctl status firewalld....

    CentOS7打开关闭防火墙与端口

    CentOS7 打开关闭防火墙与端口 1、firewalld的基本使用 2.systemctl是CentOS7的服务管理工具中主要的工具,它融合之前service和chkconfig的功能于一体。

    centos防火墙配置

    centos的防火墙配置,以及端口的开放与关闭

    CentOS 7.0防火墙Firewalld和服务相关配置

    CentOS 7.0防火墙Firewalld和服务相关配置。CentOS 7.0防火墙Firewalld和服务相关配置CentOS 7.0防火墙Firewalld和服务相关配置CentOS 7.0防火墙Firewalld和服务相关配置CentOS 7.0防火墙Firewalld和服务相关配置

Global site tag (gtag.js) - Google Analytics