centos7 关闭默认firewalld,开启iptables
编者按:
对于使用了centos6系列系统N年的运维来说,在使用centos7的时候难免会遇到各种不适应。比如防火墙问题。本文主要记录怎么关闭默认的firewalld防火墙,重新启用iptables。
1.关闭firewalld防火墙
systemctl stop firewalld
systemctl mask firewalld
2.安装iptables
yum install iptables-services
3.设置开机启动
systemctl enable iptables.service
systemctl [stop|start|restart] iptables。service
#or
service iptables [stop|start|restart]
注意:
在启动的时候会遇到这样的问题:Unit iptables.service failed to load
问题根源是在/etc/sysconfig/下面没有找到iptables文件。解决办法如下:
iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
/usr/libexec/iptables/iptables.init save #保存成功
然后再执行
systemctl start iptables.service
centos7 关闭默认firewalld,开启iptables的更多相关文章
- CentOS7关闭默认防火墙启用iptables防火墙
CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙步骤. 1.关闭firewall: systemctl stop firewalld.service #停止f ...
- centos7关闭默认firewall,启用iptables
CentOS 7.0默认使用"firewall"防火墙 一:关闭firewall1.直接关闭防火墙systemctl stop firewalld.service 2.禁止fire ...
- centos 7 关闭firewalld开启iptables
1: 关闭系统高级防火墙firewalld systemctl stop firewalld.service #停止firewall systemctl disable firewalld.servi ...
- (转)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 配置防 ...
- 树莓派(Debian)系统开启iptables的raw表实现日志输出
说明:可能Debian默认不开启iptables的raw表,所以无法通过其实现日志跟踪. 日志跟踪:http://www.cnblogs.com/EasonJim/p/8413563.html 解决方 ...
- centos7下部署iptables环境纪录(关闭默认的firewalle)
CentOS7默认的防火墙不是iptables,而是firewall.由于习惯了用iptables作为防火墙,所以在安装好centos7系统后,会将默认的firewall关闭,并另安装iptables ...
- centos7下部署iptables环境纪录(关闭默认的firewalle)(转)
下面介绍centos7关闭firewall安装iptables,并且开启80端口.3306端口的操作记录:[root@localhost ~]# cat /etc/redhat-release Cen ...
- ifconfig 命令,改变主机名,改DNS hosts、关闭selinux firewalld netfilter 、防火墙iptables规则
ifconfig 命令用于查看网络相关的命令: 安装:yum install net-tools -y ifdown eth_name 关闭网卡 ifup eth_name 开启网卡 配 ...
随机推荐
- 在MySQL或者SQLServer中,添加对象后自动返回主键到对象模型中的配置方式
设置是否使用JDBC的getGenereatedKeys方法获取主键并赋值到keyProperty设置的领域模型属性中.MySQL和SQLServer执行auto-generated key fiel ...
- JDBC编程扩展
数据库的分类:关系型数据库.非关系型数据库.这跟数据库的发展相关.关系型数据库:mysql.oracle.sqlserver非关系型数据库:redis.memcathe.mogodb.hadoop1. ...
- svn 节点处冲突 解决
问题描述: [root@localhost ] $ svn up 正在升级 ‘.’: 已跳过 ‘bg0605’ – 节点处于冲突状态 版本 175. 冲突概要: 跳过的路径:1 解决方法: 当前目录下 ...
- Linux服务器上使用curl命令发送报文
报文格式如下: curl -l -H "Content-type: application/json" -X POST -d 'postdata' http://172.20.10 ...
- 6 Easy Steps to Learn Naive Bayes Algorithm (with code in Python)
6 Easy Steps to Learn Naive Bayes Algorithm (with code in Python) Introduction Here’s a situation yo ...
- 【转载】BP神经网络
原文地址:http://blog.csdn.net/acdreamers/article/details/44657439 今天来讲BP神经网络,神经网络在机器学习中应用比较广泛,比如函数逼近,模式识 ...
- 即时新闻展示插件jQuery News Ticker,超级简单!
有时候我们为了节省页面空间,会在页面明显处放一小条,用来展示比较重要的即时新闻,一般以轮播的形式出现.今天要介绍的jQuery News Ticker插件就是用来实现这个即时新闻展示功能的,效果图如下 ...
- 小玩意1-实时获取IE浏览器输入框URL地址
主要参考http://www.cnblogs.com/scrat/archive/2012/09/12/2682626.html 主要思路如下: 通过 FindWindow() FindWindowE ...
- 20155336 2016-2017-2《JAVA程序设计》第五周学习总结
20155336 2016-2017-2<JAVA程序设计>第五周学习总结 教材学习内容总结 第八章 语法与继承构架 使用try.catch 特点: 使用try.catch语法,JVM会尝 ...
- select 函数小结 -- 转自百度知道
http://zhidao.baidu.com/link?url=UVTXeK4ncKmnwatGUW2deMFylNYBuur-zHmK3w53NXNRpgPbhld2WdkMD766nKl_6Hj ...