一、停止并禁用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.

最新文章

  1. Configure bridge on a team interface using NetworkManager in RHEL 7
  2. fedora22,fedora24最简单的安装virtaulbox的方法
  3. Codeforces Round #342 (Div. 2) A. Guest From the Past(贪心)
  4. kindeditor编辑器里面 filterMode为false时候,允许输入任何代码
  5. .Net分布式异常报警系统-客户端及服务端API
  6. windows下android环境的搭建:完成后添加android其他版本
  7. lua pbc
  8. Down to the TLP: How PCI express devices talk (Part II)
  9. js调用函数的格式
  10. BZOJ 3572: [Hnoi2014]世界树 [虚树 DP 倍增]
  11. CocoaPods 基础知识--------安装 及 使用第三方库
  12. SQL server 2017使用教程
  13. 使用node.js如何爬取网站数据
  14. 有多个.h引用时,不能有using namespace std
  15. Linux CentOS7系统中php安装配置
  16. Send [1] times, still failed
  17. rm删除破折号 - 开头的文件
  18. 面试题思考:interface和abstract的区别
  19. Delphi 正则表达式语法(3): 匹配范围
  20. linux 查看内存信息,及其他硬件信息 dmidecode命令

热门文章

  1. nginx+php部署
  2. SSH使用教程( Bitvise Tunnelier+Chrome+Proxy Switchy)
  3. .NET通过async/await实现并行
  4. paypal之nodejs 框架 Kraken-js 源码分析
  5. 前端测试回顾及我们为什么选择Karma
  6. 手机操控全站仪安卓版 测量员.app
  7. ubuntu(Mint-17)修改dns
  8. 在线PDF编辑网站http://www.pdfescape.com
  9. __new__ 的简单应用
  10. Android实战技巧:深入解析AsyncTask