修改centos7防火墙设置
来源:互联网 发布:云计算 安全问题 编辑:程序博客网 时间:2024/05/21 11:27
一、配置防火墙,开启80端口、3306端口
CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙。
1、关闭firewall:
systemctl stop firewalld.service #停止firewallsystemctl disable firewalld.service #禁止firewall开机启动
2、安装iptables防火墙
yum install iptables-services #安装
vi /etc/sysconfig/iptables #编辑防火墙配置文件
#示例开启3306 80 端口
-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 3306 -j ACCEPT
systemctl restart iptables.service #最后重启防火墙使配置生效
systemctl enable iptables.service #设置防火墙开机启动
二、关闭SELINUX vi /etc/selinux/config
#SELINUX=enforcing #注释掉
#SELINUXTYPE=targeted
#注释掉 SELINUX=disabled #增加
原文地址:http://wenku.baidu.com/link?url=NEk7jpfUKuITvPE8tm9nI2n1IoO1MFjcwYfd9IwQWuBlW90ixFESid4kWKi_7LL2J55oOuySX1k2aOVTDvGx98CCelSIJnPiEIzz8gQ9e9S
0 0
- 修改centos7防火墙设置
- CentOS7防火墙修改
- Centos7 关闭防火墙设置
- CentOS7防火墙设置
- Centos7 防火墙设置
- Centos7-firewall<防火墙设置>
- CentOS7如何设置防火墙
- Centos7防火墙设置
- centos7防火墙设置
- centos7 firewalll防火墙中的设置
- 修改CentOS7网卡设置
- CentOS7修改时区设置
- Centos7.0 修改防火墙为iptables
- centos7修改防火墙配置SSH访问
- CentOS7安装MySql5.7,防火墙关闭,修改防火墙开放端口
- CentOS7 NFS 服务器防火墙的端口设置
- [CentOs7]iptables防火墙安装与设置
- centos7 代理 镜像 防火墙设置
- CString 成员函数用法大全
- 2017亚洲智能消费电子展ACE
- Android数据存储之键值对数据和File数据
- Android Binder机制理解
- restful
- 修改centos7防火墙设置
- JSP中WEB项目常用开头
- PreAngel投资过的公司列表
- 机器学习之协同过滤
- 智能硬件无线通信协议的那些事儿(一)
- Strange fuction
- [Kafka]
- 选择法排序升级版
- (2017.2.25)新い ストーリー