一、停止并禁用firewalld

[root@test ~]# systemctl stop firewalld
[root@test ~]# systemctl disable firewalld
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service.

二、查看iptables 列表,并安装service 软件

[root@test ~]# yum list all iptables*
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.neusoft.edu.cn
* extras: mirrors.tuna.tsinghua.edu.cn
* updates: mirrors.sina.cn
已安装的软件包
iptables.x86_64 1.4.-.el7 @base
可安装的软件包
iptables.i686 1.4.-.el7 base
iptables-devel.i686 1.4.-.el7 base
iptables-devel.x86_64 1.4.-.el7 base
iptables-services.x86_64 1.4.-.el7 base
iptables-utils.x86_64 1.4.-.el7 base

安装service

[root@test ~]# yum install iptablesyum install iptables-services.x86_64 -y

三、启动iptables服务,并检查状态

[root@test ~]# systemctl start iptables
[root@test ~]# systemctl status iptables
● iptables.service - IPv4 firewall with iptables
Loaded: loaded (/usr/lib/systemd/system/iptables.service; disabled; vendor preset: disabled)
Active: active (exited) since 五 -- :: CST; 9s ago
Process: ExecStart=/usr/libexec/iptables/iptables.init start (code=exited, status=/SUCCESS)
Main PID: (code=exited, status=/SUCCESS) 8月 :: test systemd[]: Starting IPv4 firewall with iptables...
8月 :: test iptables.init[]: iptables: Applying firewall rules: [ OK ]
8月 :: test systemd[]: Started IPv4 firewall with iptables.

四、加入开机自启动

[root@test ~]# systemctl enable iptables
Created symlink from /etc/systemd/system/basic.target.wants/iptables.service to /usr/lib/systemd/system/iptables.service.

Centos7 禁止firewalld并使用iptables 作默认防火墙的更多相关文章

  1. Centos7 禁止firewalld并使用iptables 作默认防火墙以及忘记root密码的处理方法

    一.停止并禁用firewalld [root@test ~]# systemctl stop firewalld [root@test ~]# systemctl disable firewalld ...

  2. centos7 关闭默认firewalld,开启iptables

    编者按: 对于使用了centos6系列系统N年的运维来说,在使用centos7的时候难免会遇到各种不适应.比如防火墙问题.本文主要记录怎么关闭默认的firewalld防火墙,重新启用iptables. ...

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

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

  4. Ubuntu下使用UFW,以及CentOS7的默认防火墙firewalld

    UFW是一个简化版的iptables,基于iptables,配置比iptables简单 默认UFW是关闭状态,即Ubuntu默认打开所有端口,比较危险. 检测状态 ufw status 设置默认状态, ...

  5. CentOS7.3下的一个iptables配置

    centos7.3默认使用的防火墙应该是firewall,而不是iptables.而我们xxmj服务器使用的是iptables防火墙.所以,在配置防火墙之前,我们需要先关闭firewall,安装ipt ...

  6. CentOS7的firewall和安装iptables

    前言:CentOS7 的防火墙默认使用是firewall,而我们通常使用iptables: 本文记录了firewall基础的命令和iptables的安装和使用. firewall部分: part1 : ...

  7. CentOS7中firewalld的安装与使用详解

    一.软件环境 [root@Geeklp201 ~]# cat /etc/redhat-release CentOS Linux release 7.4.1708 (Core) 二.安装firewall ...

  8. 转 CentOS7使用firewalld打开关闭防火墙与端口

    http://blog.csdn.net/huxu981598436/article/details/54864260 开启端口命令 输入firewall-cmd --query-port=6379/ ...

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

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

随机推荐

  1. 如何实现在H5里调起高德地图APP?(上)

    这一篇文章,将讲述如何在H5里调起高德地图APP,并展示兴趣点.适合于展示某个餐馆,商场等,让用户自行选择前往方式. 场景一.在高德地图上展示Marker点或者POI标记 在一些基于位置分享的应用开发 ...

  2. 【Android】 Android-wifi 直连 wifi direct wifi p2p

    现在,Android的支持Wi -Fi的直接点对点点对点(P2P)Android系统的供电设备和其他类型的设备,没有一个热点或互联网连接之间的连接.Android框架提供了一套Wi - Fi的P2P的 ...

  3. 【Android】 TextView设置个别字体样式

    SpannableString msp = new SpannableString("测试"+XM+"更换当前号码将从手机发送一条普通短信进行验证"); msp ...

  4. Swift入门篇-字符串和字符

    今天主要是介绍一下字符串的用法 ,字符串的语法和object-c语法不太一样,但是思想是一样,就是写法不太一样.如果您对.net和java语法比较熟悉的话,那您几乎没有深压力.如果您对swift 基本 ...

  5. LeetCode:Roman to Integer,Integer to Roman

    首先简单介绍一下罗马数字,一下摘自维基百科 罗马数字共有7个,即I(1).V(5).X(10).L(50).C(100).D(500)和M(1000).按照下述的规则可以表示任意正整数.需要注意的是罗 ...

  6. 使用LS2J技术在LotusScript中使用Java

    我们可以使用LS2J技术在LotusScript中来调用Java类,下面举例说明: 1.       首先需要在代理的 (Options)部分,添加如下: Uselsx "*javacon& ...

  7. ASP lable标签显示过长,自动换行。

    <asp:Label ID="lab_BeforPostR" runat="server" CssClass="labSty" Wid ...

  8. Apache+PHP+Mysql OS X 10.9 Mavericks WEB 服务器配置

    在 OS X 10.9 上基本没有什么特别大的差异. 为了新系统用户方便小弟重新整理了一下,因为在 OSX 10.9 下的 Server 软件进行了不少升级,有些步骤不太一样了. 硬件方面就不在详细描 ...

  9. GitHub上排名前100的iOS开源库介绍(来自github)

    主要对当前 GitHub 排名前 100 的项目做一个简单的简介,方便初学者快速了解到当前 Objective-C 在 GitHub 的情况. 若有任何疑问可通过微博@李锦发联系我 项目名称 项目信息 ...

  10. Mac mongodb 配置安装

    简单总结就几条,比较简单配置mongodb. 1,首先下载安装包:百度云下载地址 2,下载之后解压到自己常放的工作目录下,然后开始配置一下你的Mac环境 vim ~/.bash_profile 添加m ...