[wangshumin@CentOSNode2 ~]$
Last login: Sun Jan 28 22:12:03 2018 from 192.168.72.200
[wangshumin@CentOSNode1 ~]$ su
密码:
[root@CentOSNode1 wangshumin]# firewall-cmd --state
running
[root@CentOSNode1 wangshumin]# systemctl stop firewalld.service
^[[A[root@CentOSNode1 wangshumifirewall-cmd --state
not running
[root@CentOSNode1 wangshumin]# systemctl disable firewalld.service
Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
[root@CentOSNode1 wangshumin]# yum install iptables-services
已加载插件:fastestmirror, langpacks
base | 3.6 kB 00:00:00
extras | 3.4 kB 00:00:00
updates | 3.4 kB 00:00:00
Loading mirror speeds from cached hostfile
* base: mirror.bit.edu.cn
* extras: mirror.bit.edu.cn
* updates: mirrors.neusoft.edu.cn
正在解决依赖关系
--> 正在检查事务
---> 软件包 iptables-services.x86_64.0.1.4.21-18.2.el7_4 将被 安装
--> 正在处理依赖关系 iptables = 1.4.21-18.2.el7_4,它被软件包 iptables-services-1.4.21-18.2.el7_4.x86_64 需要
--> 正在检查事务
---> 软件包 iptables.x86_64.0.1.4.21-18.0.1.el7.centos 将被 升级
---> 软件包 iptables.x86_64.0.1.4.21-18.2.el7_4 将被 更新
--> 解决依赖关系完成
依赖关系解决
=============================================================================================================================================================================================
Package 架构 版本 源 大小
=============================================================================================================================================================================================
正在安装:
iptables-services x86_64 1.4.21-18.2.el7_4 updates 51 k
为依赖而更新:
iptables x86_64 1.4.21-18.2.el7_4 updates 428 k
事务概要
=============================================================================================================================================================================================
安装 1 软件包
升级 ( 1 依赖软件包)
总计:479 k
总下载量:51 k
Is this ok [y/d/N]: y
Downloading packages:
警告:/var/cache/yum/x86_64/7/updates/packages/iptables-services-1.4.21-18.2.el7_4.x86_64.rpm: 头V3 RSA/SHA256 Signature, 密钥 ID f4a80eb5: NOKEY ] 0.0 B/s | 0 B --:--:-- ETA
iptables-services-1.4.21-18.2.el7_4.x86_64.rpm 的公钥尚未安装
iptables-services-1.4.21-18.2.el7_4.x86_64.rpm | 51 kB 00:00:07
从 file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 检索密钥
导入 GPG key 0xF4A80EB5:
用户ID : "CentOS-7 Key (CentOS 7 Official Signing Key)
指纹 : 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5
软件包 : centos-release-7-4.1708.el7.centos.x86_64 (@anaconda)
来自 : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
是否继续?[y/N]:y
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
正在更新 : iptables-1.4.21-18.2.el7_4.x86_64 1/3
正在安装 : iptables-services-1.4.21-18.2.el7_4.x86_64 2/3
清理 : iptables-1.4.21-18.0.1.el7.centos.x86_64 3/3
验证中 : iptables-services-1.4.21-18.2.el7_4.x86_64 1/3
验证中 : iptables-1.4.21-18.2.el7_4.x86_64 2/3
验证中 : iptables-1.4.21-18.0.1.el7.centos.x86_64 3/3
已安装:
iptables-services.x86_64 0:1.4.21-18.2.el7_4
作为依赖被升级:
iptables.x86_64 0:1.4.21-18.2.el7_4
完毕!
[root@CentOSNode1 wangshumin]# systemctl start iptables.service
[root@CentOSNode1 wangshumin]# systemctl status iptables.service
● iptables.service - IPv4 firewall with iptables
Loaded: loaded (/usr/lib/systemd/system/iptables.service; disabled; vendor preset: disabled)
Active: active (exited) since 日 2018-01-28 22:34:18 CST; 38s ago
Process: 4306 ExecStart=/usr/libexec/iptables/iptables.init start (code=exited, status=0/SUCCESS)
Main PID: 4306 (code=exited, status=0/SUCCESS)
1月 28 22:34:15 CentOSNode1 systemd[1]: Starting IPv4 firewall with iptables...
1月 28 22:34:17 CentOSNode1 iptables.init[4306]: iptables: Applying firewall rules: [ 确定 ]
1月 28 22:34:18 CentOSNode1 systemd[1]: Started IPv4 firewall with iptables.
[root@CentOSNode1 wangshumin]# systemctl stop iptables.service
[root@CentOSNode1 wangshumin]#