Centos7 关闭防火墙(Firewalld ),使用防火墙(iptables)
1、直接关闭防火墙
systemctl stop firewalld.service; #停止firewall
systemctl disable firewalld.service; #禁止firewall开机启动
2、安装并启动 iptables service,以及设置开机自启
yum -y install iptables-services;#安装iptables
systemctl start iptables;#启动iptables
systemctl enable iptables;#自启动iptables
systemctl start ip6tables;#启动ip6tables(不需要可以跳过)
systemctl enable ip6tables;#自启动ip6tables(不需要可以跳过)
3、配置iptables service
vi /etc/sysconfig/iptables;#如增加防火墙端口3306和一些常用端口 80、8080等
增加规则:
-A INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT;
-A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT;
-A INPUT -p tcp -m state --state NEW -m tcp --dport 8080 -j ACCEPT;
保存退出后。
3、重启 iptables service,
systemctl restart iptables.service #重启防火墙使配置生效
4、最后重启系统使设置生效即可
reboot;
Centos7 关闭防火墙(Firewalld ),使用防火墙(iptables)的更多相关文章
- centos7 关闭默认firewalld,开启iptables
编者按: 对于使用了centos6系列系统N年的运维来说,在使用centos7的时候难免会遇到各种不适应.比如防火墙问题.本文主要记录怎么关闭默认的firewalld防火墙,重新启用iptables. ...
- centos7关闭默认firewall,启用iptables
CentOS 7.0默认使用"firewall"防火墙 一:关闭firewall1.直接关闭防火墙systemctl stop firewalld.service 2.禁止fire ...
- CentOS7中关闭firewall,并使用iptables管理防火墙
背景描述 在使用Docker时,启用centos7默认的firewall,启动端口映射时,防火墙规则不生效.docker默认使用了iptables防火墙机制.所以需要关闭firewall使用iptab ...
- CentOS7防火墙firewalld 和 CentOS6防火墙iptables的一些配置命令
CentOS7 防火墙 一.防火墙的开启.关闭.禁用.查看状态命令 (1)启动防火墙:systemctl start firewalld (2)关闭防火墙:systemctl stop firewal ...
- CentOS 7.0 关闭firewalld防火墙指令 及更换Iptables防火墙
CentOS 7.0 关闭firewalld防火墙指令 及更换Iptables防火墙 时间:2014-10-13 19:03:48 作者:哎丫丫 来源:哎丫丫数码网 查看:11761 评论:2 ...
- CentOS7关闭默认防火墙启用iptables防火墙
CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙步骤. 1.关闭firewall: systemctl stop firewalld.service #停止f ...
- CentOS7 防火墙firewalld 和 CentOS6 防火墙iptables 开放zabbix-agent端口的方法
我们在生产环境中,一般都是把防火墙打开的,不像测试环境,可以直接关闭掉.最近安装zabbix ,由于公司服务器既有centos 7又有centos 6,遇到了一些防火墙的问题,现在正好把centos防 ...
- CentOS7.3防火墙firewalld简单配置
今天安装了centos7.3, 想用iptables的save功能保存规则的时候发现跟rhel不一样了, 后来度娘说centos用的是firewalld而不是iptables了, 平时工作都是用re ...
- 如何将centos7自带的firewall防火墙更换为iptables防火墙
用惯了centos6的iptables防火墙,对firewall太无感了,那么如何改回原来熟悉的iptables防火墙呢? 1.关闭firewall防火墙 [root@centos7 html]# s ...
- Centos7 防火墙 firewalld 实用操作
一.前言 Centos7以上的发行版都试自带了firewalld防火墙的,firewalld去带了iptables防火墙.其原因是iptables的防火墙策略是交由内核层面的netfilter网络过滤 ...
随机推荐
- php页面如何增加下载软件功能
php <?php $array = parse_ini_file("sample.ini"); ?> <a id="btnDownloadFull&q ...
- Java语言程序设计(基础篇)第一章
第一章 计算机.程序和Java概述 1.1 引言 什么是程序设计呢? 程序设计就是创建(或者开发)软件,软件也称为程序. 1.2 什么是计算机 计算机是存储和处理数据的电子设备,计算机包括硬件(har ...
- spark转换集合为RDD
SparkContext可以通过parallelize把一个集合转换为RDD def main(args: Array[String]): Unit = { val conf = new SparkC ...
- R扩展包
log10() .libPaths()#查看R包目录 library()#查看以前安装的函数 search() #安装R包的方式 install.packages("car")#安 ...
- Windows Phone 十一、MVVM模式
MVVM 模式介绍 模型-视图-视图模型 (MVVM) 是一种用来分离 UI 和非 UI 代码的应用设计模式 MVVM – 模型(Model) MVVM 中的 Model 与 MVC 中的一致,用于封 ...
- android案例一 电话拨号器
效果图: 电话拨号器的核心原理: 意图 MainActivity代码: private EditTest et_number; //加载一个布局 setContentView(R.l ...
- 夺命雷公狗----Git---2---基本用法
首先我们来创建一个git仓库,其实命令也是很简单的.. git init 其实在创建完成后,该目录会多了一个.git的文件夹,但该文件夹是隐藏的.... 其实这就是一个git仓库,特别建议不要在这个目 ...
- Kolmogorov-Smirnov检验
Kolmogorov-Smirnov检验(K-S检验)基于累积分布函数,用以检验一个经验分布是否符合某种理论分布或比较两个经验分布是否有显著性差异. 两样本K-S检验由于对两样本的经验分布函数的位置和 ...
- 移动设备如何打开RMS加密的文档
关键字:RMS. AZure RMS.IPhone.Android.Office365.Sharepoint.Exchange 最近总是碰到要求用苹果手机及安卓手机阅读RMS加密文档的需求,经过查找相 ...
- 使用Apache Ambari管理Hadoop
随着Hadoop越来越普及,对合适的管理平台的需求成为当前亟待解决的问题.已经有几个商业性的Hadoop管理平台,如Cloudera Enterprise Manager,但Apache Ambari ...