CentOS 7关闭firewalld启用iptables
在CentOS7中,有很多CentOS 6中的常用服务发生了变化。
其中iptables是其中比较大的一个。防火墙iptables被firewalld取代。
本文将介绍,如果采用systemctl关闭firewalld,开启iptables。
1.关闭firewalld
[root@hwcentos70- system]# systemctl stop firewalld
[root@hwcentos70- system]# systemctl disable firewalld
[root@hwcentos70- system]# systemctl status firewalld
firewalld.service - firewalld - dynamic firewall daemon Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled) Active: inactive (dead) Feb :: hwcentos70- systemd[]: Stopped firewalld - dynamic firewall daemon. Feb :: hwcentos70- systemd[]: Starting firewalld - dynamic firewall daemon... Feb :: hwcentos70- systemd[]: Started firewalld - dynamic firewall daemon. Feb :: hwcentos70- systemd[]: Started firewalld - dynamic firewall daemon. Feb :: hwcentos70- systemd[]: Stopping firewalld - dynamic firewall daemon... Feb :: hwcentos70- systemd[]: Stopped firewalld - dynamic firewall daemon.
2.开启iptables
首先安装iptables:
[root@hwcentos70- system]#yum install -y iptables-services
[root@hwcentos70- system]# systemctl enable iptables
ln -s '/usr/lib/systemd/system/iptables.service' '/etc/systemd/system/basic.target.wants/iptables.service' [root@hwcentos70- system]# systemctl start iptables
[root@hwcentos70- system]# systemctl status iptables
iptables.service - IPv4 firewall with iptables Loaded: loaded (/usr/lib/systemd/system/iptables.service; enabled) Active: active (exited) since Fri -- :: UTC; 6s ago Process: ExecStart=/usr/libexec/iptables/iptables.init start (code=exited, status=/SUCCESS) Main PID: (code=exited, status=/SUCCESS) Feb :: hwcentos70- iptables.init[]: iptables: Applying firewall rules: [ OK ] Feb :: hwcentos70- systemd[]: Started IPv4 firewall with iptables.
此时iptables的命令都可以使用了:
[root@hwcentos70- system]# iptables -L
Chain INPUT (policy ACCEPT) target prot opt source destination Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination [root@hwcentos70- system]# service iptables save
iptables: Saving firewall rules to /etc/sysconfig/iptables:[ OK ]
CentOS 7关闭firewalld启用iptables的更多相关文章
- CentOS 7关闭firewalld启用iptables 开放端口
在CentOS7中,有很多CentOS 6中的常用服务发生了变化. 其中iptables是其中比较大的一个.防火墙iptables被firewalld取代. 本文将介绍,如果采用systemctl关闭 ...
- centos 7 关闭firewalld开启iptables
1: 关闭系统高级防火墙firewalld systemctl stop firewalld.service #停止firewall systemctl disable firewalld.servi ...
- 玩转Linux之- CentOS 7.0,启用iptables防火墙
原文 玩转Linux之- CentOS 7.0,启用iptables防火墙 CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙. 1.关闭firewall:sy ...
- Centos7防火墙关闭和启用iptables操作
https://yq.aliyun.com/ziliao/33590前序 还是docker惹得最近做的系统都是上的centos7的系统带来的一系列的新环境的适应 补记下:在使用oracle vmbox ...
- Centos7 防火墙关闭和启用iptables防火墙
操作系统环境:CentOS Linux release 7.0.1406(Core) 64位CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙步骤. 1.关闭f ...
- CentOS 8 关闭 Firewalld 及 SELinux
检查 SELinux 是否开启 执行 sestatus 指令可以检视目前 SELinux 的状态, 其中一项是是否有开启, 执行以下指令: # sestatus | grep status 如果看到 ...
- CentOS 7.0,启用iptables防火墙
CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙. 1.关闭firewall: systemctl stop firewalld.service #停止fir ...
- (转)CentOS 7.0关闭默认防火墙启用iptables防火墙
场景:在本地虚拟机上使用ftp软件需要进行相应的端口设置,不可避免要访问Cnetos的防火墙,默认firewall操作不方便,所以需要进行相应的替换. 1 配置防火墙,开启80端口.3306端口 1. ...
- CentOS 7.0关闭默认防火墙启用iptables防火墙
转自:https://www.cnblogs.com/lixuwu/p/6087023.html 阅读目录 1 配置防火墙,开启80端口.3306端口 2 关闭SELINUX 3 CentOS 配置防 ...
随机推荐
- nginx学习之压缩解压篇(七)
1.简介 压缩响应可以减少传输数据的大小,节省带宽.但过多的压缩会造成很大的处理开销.在发送给客户端之前,nginx会对响应做压缩,但是如果后端服务器已经 压缩过了,nginx就不再压缩. 2.开启压 ...
- OLTP和OLAP
1 OLTP和OLAP online transaction processing,联机事务处理.业务类系统主要供基层人员使用,进行一线业务操作,通常被称为联机事务处理. online analyti ...
- Protobuf 语法 - 史上最简教程
Protobuf 语法简明教程 疯狂创客圈 死磕Netty 亿级流量架构系列之12 [博客园 总入口 ] 在protobuf中,协议是由一系列的消息组成的.因此最重要的就是定义通信时使用到的消息格式. ...
- 我的Android进阶之旅------>Android 标签的用法
布局资源文件的根节点可以使用容器控件(如LinearLayout.FrameLayout等),也可以使用非容器控件(如:EditText.TextView等).对于非容器控件,只能在非容器控件标签中放 ...
- linux 10 -Bash Shell编程
二十三. Bash Shell编程: 1. 读取用户变量: read命令是用于从终端或者文件中读取输入的内建命令,read命令读取整行输入,每行末尾的换行符不被读入.在read命令后 ...
- 第2条:遵循PEP8风格指南
<Python Enhancement Proposal #8>(8号Python增强提案)又叫PEP8,它是针对Python代码格式而编订的风格指南. 尽管可以在保证语法正确的前提下随意 ...
- Pinpoint扩展插件实践笔记
为链路(spanEvent)添加tag 背景 我们可能需要想在代码中写入特定的信息到调用链中,并且希望对里面的特定key做检索 实现思路 创建一个特定的类,只需要一个方法,再对这个类的方法进行增强,这 ...
- Yii2 如何更好的在页面注入CSS
首先 先添加一个widgets,代码如下(提示:使用时注意修改命名空间) <?php /** * User: yiqing * Date: 2014/12/15 * Time: 0:21 */ ...
- 视图的创建与使用 Sql Server View
创建教材的三个数据表Student.Course及SC. create database S_T Use S_T CREATE TABLE Student (Sno CHAR(9), Sname CH ...
- python正则-- re模块
匹配数字相关'.' 默认匹配除\n之外的任意一个字符,若指定flag DOTALL,则匹配任意字符,包括换行'^' 匹配字符开头,若指定flags MULTILINE,这种也可以匹配上(r" ...