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网络过滤 ...
随机推荐
- Spring的JDBC框架
转自: http://www.cnblogs.com/windlaughing/p/3287750.html Spring JDBC提供了一套JDBC抽象框架,用于简化JDBC开发. Spring主要 ...
- 两个有意思的模式在ECMAScript中的实现
简介 本篇文章对设计模式进行了筛选, 只列举两个有意思(坑)的设计实现, 如有错误愿闻其详. 构造函数 ECMAScript中的构造函数和其他语言的有那么点特别之处,可以认为, 一个函数, 如果被以n ...
- Mac使用最多的软件,整理集合
软件资源 #[PDF移除密码]Cisdem PDFPasswordRemover 3.0.0 [TNT] #Alfred_3.1.1_737 #fwmso2016vlu2.0 #iHosts #Omn ...
- Android JavaMail
一.简介 JavaMail API提供了一种与平台无关和协议独立的框架来构建邮件和消息应用程序. JavaMail API提供了一组抽象类定义构成一个邮件系统的对象.它是阅读,撰写和发送电子信息的可选 ...
- MyEclipse 及Tomcate 安装 配置
使用的工具为myeclipse-pro-2014-GA-offline-installer-windows(需安装).apache-tomcat-6.0.37.jdk1.6.0.14. 1.MyEcl ...
- [SharePoint 2013] Automatic deployment script
Implement automatic deployment through windows task. Add-PsSnapin Microsoft.SharePoint.PowerShell $t ...
- C# Console控制命令
参考博客:C# 控制台程序(命令行程序)设置字体颜色,窗口宽高,光标行数 禁用控制台关闭按钮,参考博客:禁用C#控制台应用程序的关闭按钮 参考博客:c# 控制台程序禁用关闭按钮完美解决 #region ...
- openSUSE4.1 安装docker
安装完Leap后,通过YaST-Software Management安装docker. 安装 docker . yast2-docker. ruby2.1-rubygem-docker-api . ...
- js 实现类似php函数number_format的功能
今天同事在做一个功能的时候需要使用js来实现类似php函数number_format的功能,最后就有了下面的方法,可以实现了: /** * number_format * @param number ...
- jquery 选择器(name,属性,元素)大全
jQuery 选择器大体上可分为:基本选择器.层次选择器.过滤选择器.表单选择器. 其中过滤选择器可以分为:简单过滤选择器.内容过滤选择器.可见性过滤选择器.属性过滤选择器.子元素过滤选择器.表单对象 ...