http://stackoverflow.com/questions/24756240/how-can-i-use-iptables-on-centos-7

# sudo service iptables start
Redirecting to /bin/systemctl start iptables.service
Failed to issue
method call: Unit iptables.service failed to load: No such file or directory.

With RHEL 7 / CentOS 7, firewalld was introduced to manage iptables. IMHO, firewalld is more suited for workstations than for server environments.

It is possible to go back to a more classic iptables setup. First, stop and mask the firewalld service:

systemctl stop firewalld
systemctl mask firewalld

Then, install the iptables-services package:

yum install iptables-services

Enable the service at boot-time:

systemctl enable iptables

Managing the service

systemctl [stop|start|restart] iptables

Saving your firewall rules can be done as follows:

service iptables save

or

/usr/libexec/iptables/iptables.init save
 

How can i use iptables on centos 7 or fedora?的更多相关文章

  1. 在 CentOS 7.x / Fedora 21 上面体验 PHP 7.0

    编译自:http://linoxide.com/linux-how-to/install-php-7-centos-7-fedora-21/作者: Aun Raza原创:LCTT https://li ...

  2. [转载]Install Opera 12.16 Web Browser in CentOS/RHEL and Fedora

    FROM: http://tecadmin.net/install-opera-web-browser-in-centos-rhel-fedora/ Opera is an modern web br ...

  3. MySQL For Linux(CentOS/Ubuntu/Debian/Fedora/Arch)一键安装脚本(5.1-8.0)

    简介 很多童鞋不懂这么在Linux系统安装MySQL,网上大多数教程较复杂,不太适合小白安装,本教程提供一键安装脚本供大家使用,教大家怎么在Linux操作系统( 支持CentOS/Ubuntu/Deb ...

  4. iptables 实现centos内网机器访问外网

    环境:一台带外网和内网的机器,另一台只有内网,默认不能上网.两台机器都是centos系统带外网机器的外网ip为 123.221.20.11, 内网ip为 192.168.15.100内网机器的内网ip ...

  5. How can i use iptables on centos 7?

    I installed CentOS 7 with minimal configuration (os + dev tools). I am trying to open 80 port for ht ...

  6. 关闭iptables(Centos)

    由于搭建了CDH-Hadoop,方便起见,事先关闭了防火墙: services iptables stop; chkconfig iptables off; services ip6tables st ...

  7. Google Chrome 35 Released – Install on RHEL/CentOS 6 and Fedora 20-15

    Google Chrome is a freeware web browser developed by Google Inc. Google Chrome team proudly announce ...

  8. Install Server Backup Manager on CentOS, RHE, and Fedora

    Skip to end of metadata Added by Internal, last edited by Internal on Aug 25, 2014 Go to start of me ...

  9. How to fix yum errors on CentOS, RHEL or Fedora

    Yum is a package management tool for installing, updating and removing rpm packages on RedHat-based ...

随机推荐

  1. 利用redis限制单个时间内某个mac地址的访问次数

    一.思路 用户mac地址唯一,可以作为redis中的key,每次请求进来,利用ttl命令,判断redis中key的剩余时间,如果大于零,则利用incr进行+1操作,然后再与总的限制次数作对比. 二.代 ...

  2. Git(二):常用 Git 命令清单

    转: http://www.ruanyifeng.com/blog/2015/12/git-cheat-sheet.html 我每天使用 Git ,但是很多命令记不住. 一般来说,日常使用只要记住下图 ...

  3. 好一个Time_Wait状态(TCP/IP)

    首先简单介绍一下Time_Wait是个什么鬼: 在TCP/IP协议中,我们都知道有三次握手四次挥手的过程,先来一个简单的图: 各个状态和基本的过程想必了解过TCP/IP协议的人都清楚,本次介绍的主题只 ...

  4. 【原】Coursera—Andrew Ng机器学习—课程笔记 Lecture 14—Dimensionality Reduction 降维

    Lecture 14 Dimensionality Reduction 降维 14.1 降维的动机一:数据压缩 Data Compression 现在讨论第二种无监督学习问题:降维. 降维的一个作用是 ...

  5. Linux实战教学笔记47:JAVA企业级应用服务器之TOMCAT实战

    第一章 Tomcat简介 Tomcat是Apache软件基金会(Apache Software Foundation)的Jakarta项目中的一个核心项目,由Apache,Sun和其他一些公司及个人共 ...

  6. O(n)求中位数和第k大数

    解题关键:模板与思路.面试题 #include<cstdio> #include<cstring> #include<algorithm> #include< ...

  7. C++——代码运行过程详解

    #include <iostream> using namespace std; ;//初始化的全局变量:保存在数据段 char *p1;//未初始化的全局变量:保存在BSS段 int m ...

  8. Python实现常见算法[1]——冒泡排序

    #!/usr/bin/python def BUBBLE_SORT(L, x, y): j = y while j>x: i = x while i<j: if L[i] > L[i ...

  9. ubuntu Qt5 opencv3.4 项目配置

    #------------------------------------------------- # # Project created by QtCreator 2019-03-25T14:14 ...

  10. 14-python登入教务网(python+bs4)

    用request先得到到session对象,用其去放送请求,会自动保存cookie. 模拟有验证码的登入步骤: 1.发送请求登入页面: 2.分析验证码的地址,以及要将登入请求发往的地址(可以先输入错的 ...