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 配置防 ...
随机推荐
- 九度OJ 1181:遍历链表 (链表、排序)
时间限制:1 秒 内存限制:32 兆 特殊判题:否 提交:2733 解决:1181 题目描述: 建立一个升序链表并遍历输出. 输入: 输入的每个案例中第一行包括1个整数:n(1<=n<=1 ...
- 【python】-- 递归函数、高阶函数、嵌套函数、匿名函数
递归函数 在函数内部,可以调用其他函数.但是在一个函数在内部调用自身,这个函数被称为递归函数 def calc(n): print(n) if int(n/2) == 0: #结束符 return n ...
- lua2json
lua对象json序列化,很简单,没做中文的unicode编码了 local function bool2json(v) return v and "true" or " ...
- Computer Vision: Algorithms and ApplicationsのImage processing
实在是太喜欢Richard Szeliski的这本书了.每一章节(after chapter3)都详述了该研究方向比較新的成果.还有很多很多的reference,假设你感兴趣.全然能够看那些參考论文 ...
- 解决ajax get方式提交中文参数乱码问题
最近在工作中遇到,使用ajax get方式提交中文参数的时候出现乱码,通过上网搜索,总结出比较简单的两种解决方案: 第一种,由于tomcat默认的字符集是ISO-8859-1,修改Tomcat中的se ...
- eclipse的问题:如何在debug模式下,能始终看到某变量的值
Window—>Show View—>other—>Debug—>Expressions中左边是变量名,右边显示变量value.
- Ubuntu安装教程
http://www.linuxdiyf.com/linux/13198.html 简易配置说明 磁盘分区,新分区的磁盘必须是未分配的, 到管理-磁盘管理下面查看磁盘是不是未分配的,如果已分配了,在磁 ...
- HDU - 1033 Edge 【模拟】
题目链接 http://acm.hdu.edu.cn/showproblem.php?pid=1033 题意 给定一个起始点 300 420 走的第一步是 310 420 下面的每一步 都由 输入决定 ...
- 用Java实现断点续传的基本思路和代码
用Java实现断点续传的基本思路和代码 URL url = new URL(http://www.oschina.net/no-exist.zip); HttpURLConnection http ...
- 20145229吴姗珊 《Java程序设计》第5周学习总结
20145229吴姗珊 <Java程序设计>第5周学习总结 教材学习内容总结 第八章 异常处理 1.设计错误对象都继承自java.lang.Throwable类 2.Java中所有错误都会 ...