编者按:

  对于使用了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的更多相关文章

  1. CentOS7关闭默认防火墙启用iptables防火墙

    CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙步骤. 1.关闭firewall: systemctl stop firewalld.service #停止f ...

  2. centos7关闭默认firewall,启用iptables

    CentOS 7.0默认使用"firewall"防火墙 一:关闭firewall1.直接关闭防火墙systemctl stop firewalld.service 2.禁止fire ...

  3. centos 7 关闭firewalld开启iptables

    1: 关闭系统高级防火墙firewalld systemctl stop firewalld.service #停止firewall systemctl disable firewalld.servi ...

  4. (转)CentOS 7.0关闭默认防火墙启用iptables防火墙

    场景:在本地虚拟机上使用ftp软件需要进行相应的端口设置,不可避免要访问Cnetos的防火墙,默认firewall操作不方便,所以需要进行相应的替换. 1 配置防火墙,开启80端口.3306端口 1. ...

  5. CentOS 7.0关闭默认防火墙启用iptables防火墙

    转自:https://www.cnblogs.com/lixuwu/p/6087023.html 阅读目录 1 配置防火墙,开启80端口.3306端口 2 关闭SELINUX 3 CentOS 配置防 ...

  6. 树莓派(Debian)系统开启iptables的raw表实现日志输出

    说明:可能Debian默认不开启iptables的raw表,所以无法通过其实现日志跟踪. 日志跟踪:http://www.cnblogs.com/EasonJim/p/8413563.html 解决方 ...

  7. centos7下部署iptables环境纪录(关闭默认的firewalle)

    CentOS7默认的防火墙不是iptables,而是firewall.由于习惯了用iptables作为防火墙,所以在安装好centos7系统后,会将默认的firewall关闭,并另安装iptables ...

  8. centos7下部署iptables环境纪录(关闭默认的firewalle)(转)

    下面介绍centos7关闭firewall安装iptables,并且开启80端口.3306端口的操作记录:[root@localhost ~]# cat /etc/redhat-release Cen ...

  9. ifconfig 命令,改变主机名,改DNS hosts、关闭selinux firewalld netfilter 、防火墙iptables规则

    ifconfig 命令用于查看网络相关的命令: 安装:yum install net-tools -y  ifdown  eth_name  关闭网卡  ifup  eth_name   开启网卡 配 ...

随机推荐

  1. bzoj千题计划164:bzoj5123: 线段树的匹配

    http://www.lydsy.com/JudgeOnline/upload/201712/prob12.pdf dp[len][0/1] 表示节点表示区间长度为len,节点选/不选的 最大匹配 s ...

  2. NOIP2012 提高组 Day 1

    期望得分:100+100+70=270 实际得分:100+50+70=220 T2 没有底 最后剩余时间来不及打高精.思路出现错误 T1 Vigenère 密码 题目描述 16 世纪法国外交家 Bla ...

  3. 用Python来进行词频统计

    # 把语料中的单词全部抽取出来, 转成小写, 并且去除单词中间的特殊符号 def words(text): return re.findall('[a-z]+', text.lower()) def ...

  4. PHP 命令行模式实战之cli+mysql 模拟队列批量发送邮件(在Linux环境下PHP 异步执行脚本发送事件通知消息实际案例)

    源码地址:https://github.com/Tinywan/PHP_Experience 测试环境配置: 环境:Windows 7系统 .PHP7.0.Apache服务器 PHP框架:ThinkP ...

  5. 基于受限玻尔兹曼机(RBM)的协同过滤

    受限玻尔兹曼机是一种生成式随机神经网络(generative stochastic neural network), 详细介绍可见我的博文<受限玻尔兹曼机(RBM)简介>, 本文主要介绍R ...

  6. fvwm:还是觉得你最好

    2008-07-12的老日志 用了gnome和xfce,还是有些厌了,摆弄了两天fvwm,发现虽然配置起来有点麻烦,但用起来还是它最贴心,而且占资源极少,系统使用过程中内存一直只用了五六十兆.我的鼠标 ...

  7. Java容器Map接口

    Map接口容器存放的是key-value对,由于Map是按key索引的,因此 key 是不可重复的,但 value 允许重复. 下面简单介绍一下Map接口的实现,包括HashMap,LinkedHas ...

  8. SMTP——MIME

    MIME 基础知识 MIME 表示多用途 Internet 邮件扩允协议.MIME 扩允了基本的面向文本的 Internet 邮件系统,以便可以在消息中包含二进制附件. MIME 信息由正常的 Int ...

  9. POJ 2485 Highways( 最小生成树)

    题目链接 Description The islandnation of Flatopia is perfectly flat. Unfortunately, Flatopia has no publ ...

  10. js数据类型隐式转换问题

    js数据类型隐式转换 ![] == false //true 空数组和基本类型转换,会先[].toString() 再继续比较 ![] == [] //true ![] //false [] == [ ...