最近在centos7下,搭建ftp服务,按照步骤一步一步来,发现 etc/sysconfig/iptables这个文件并不存在,然后去找解决方案,

原文地址:http://blog.csdn.net/iamzhangyouzhi/article/details/41978537

解决办法:
. 随便写一条iptables命令配置个防火墙规则。如:iptables -P OUTPUT ACCEPT。 [root@iZ23gx7o02aZ /]# cd /etc/sysconfig/
[root@iZ23gx7o02aZ sysconfig]# iptables -P OUTPUT ACCEPT
. service iptables save进行保存。 [root@iZ23gx7o02aZ sysconfig]# service iptables save
iptables: Saving firewall rules to /etc/sysconfig/iptables:[ OK ]
[root@iZ23gx7o02aZ sysconfig]# ls
atd firstboot iptables-config networking readonly-root sshd
auditd grub irqbalance network-scripts rhn sysstat
authconfig htcacheclean kdump ntpd rngd sysstat.ioconf
cbq httpd kernel ntpdate rsyslog system-config-firewall
clock i18n keyboard prelink sandbox system-config-firewall.old
console init modules quota_nld saslauthd udev
cpuspeed ip6tables-config netconsole raid-check selinux
crond iptables network readahead smartmontools
[root@iZ23gx7o02aZ sysconfig]#
. service iptables restart命令重启: [root@iZ23gx7o02aZ sysconfig]# service iptables restart
iptables: Setting chains to policy ACCEPT: filter [ OK ]
iptables: Flushing firewall rules: [ OK ]
iptables: Unloading modules: [ OK ]
iptables: Applying firewall rules: [ OK ]
[root@iZ23gx7o02aZ sysconfig]#
但是在service iptables save进行保存操作时,提示save指令不存在,于是继续找解决方案,
原文地址:http://blog.163.com/xavier_666/blog/static/25884000720163299503423/ 首先不管防火墙有没有关 都使用systemctl stop firewalld 关闭防火墙
然后使用 yum install iptables-services 安装或更新服务
再使用systemctl enable iptables 启动iptables
最后 systemctl start iptables 打开iptables
大功告成
试试service iptables save

centos7下找不到iptables文件的更多相关文章

  1. /etc/sysconfig/下找不到iptables文件解决方法

    时间:2014-12-19 01:17来源:csdn 作者:大智 举报 点击:5639次 本想做些防火墙策略.防火墙策略都是写在/etc/sysconfig/iptables文件里面的.可我发现我也没 ...

  2. Intellij16创建Spring-Mybatis项目创(填)建(坑)记录,解决IDEA下找不到xml文件的问题

    转入Intellij已经有1个月了,编程效率确实比Eclipse快了很多,而且可以直接使用Maven,然后就想写个小项目玩玩,架构搭建完后,想着万事俱备,又不是第一次玩框架,照葫芦画瓢撑死半天就能完成 ...

  3. Linux下找不到so文件的解决办法

    http://www.cnblogs.com/xudong-bupt/p/3698294.html 如果使用自己手动生成的动态链接库.so文件,但是这个.so文件,没有加入库文件搜索路劲中,程序运行时 ...

  4. centos7下rsync+inotify脚本实现文件同步,.NET CORE客户端文件更新后自动重启服务

    源服务器IP:192.168.8.51 目标服务器IP:192.168.8.79 安装前源服务器及目标服务器均需关闭FIREWALLD\SELINUX防火墙 sestatus | grep statu ...

  5. Centos7下关闭Firewalls配置iptables

    在网上搜索了很多这种资料,现在总结一下以备后用. 1.关闭防火墙:sudo systemctl stop firewalld.service 2.关闭开机启动:sudo systemctl disab ...

  6. centos7下没有iptables

    从centos7开始使用linux,之前版本的没有深入了解过,今天要开放个端口,需要有防火墙的相关操作,从网上查资料都是编辑/etc/sysconfig目录下面的iptables文件,可我进入这个文件 ...

  7. Linux系统下我的/etc/sysconfig/路径下无iptables文件

    转载于:https://blog.csdn.net/zzm8421/article/details/78083582 虚拟机新装了一个CentOs7,然后做防火墙配置的时候找不到iptables文件, ...

  8. 防火墙问题 Linux系统 /etc/sysconfig/路径下无iptables文件

    虚拟机新装了一个CentOs7,然后做防火墙配置的时候找不到iptables文件,解决方法如下: 因为默认使用的是firewall作为防火墙,把他停掉装个iptable systemctl stop ...

  9. Centos7下的基本操作

    本系统是在centos7下最小化安装的 文件操作相关 创建文件夹mkdir name //创建一个文件夹 创建文本touch test.txt //创建文本 删除文件夹rm -rf 文件名 //删除文 ...

随机推荐

  1. [UE4]Get Parent,widget获得父容器实例对象

  2. protocol buf安装

    1:下载安装包 $wget https://github.com/google/protobuf/archive/v2.6.1.zip $unzip protobuf-2.6.1.zip $cd pr ...

  3. CS229 7.2 应用机器学习方法的技巧,准确率,召回率与 F值

    建立模型 当使用机器学习的方法来解决问题时,比如垃圾邮件分类等,一般的步骤是这样的: 1)从一个简单的算法入手这样可以很快的实现这个算法,并且可以在交叉验证集上进行测试: 2)画学习曲线以决定是否更多 ...

  4. Echarts动态加载饼状图实例(二)

    一.引入echarts.js文件(下载页:http://echarts.baidu.com/download.html) 二.HTML代码: <div class="ui-contai ...

  5. sql zhuan ORACLE

    DbType   OracleType SqlDatabase OracleDatabase SqlParam.cs SqlServerHelper.cs InsertByHashtableRetur ...

  6. 重新指派usb转串口模块在linux系统中的设备调用名称

    How to remap /dev/ttyUSB* to a specific name to be called by my program. How to map /dev/ttyUSB* to ...

  7. 普通rgb转换为16进制

    http://www.zhangxinxu.com/study/201003/color-exchange-test.html

  8. uva-10887-枚举

    题意:集合S1和S2,把S2中的元素拼接到S1的后面去,生成新的元素,问有多少个不重复的元素 直接map.注意,不能用cin读取字符串,题目没有保证字符串中间没有空格 #include "p ...

  9. 4. powerdesigner 生成sql脚本步骤

    1. 选择数据库类型:DataBase(数据库)-- Change Current DBMS 2. 生成数据库脚本:DataBase(数据库)--generate Database

  10. EventBus用法

    什么是EventBus EventBus是一个Android端优化的publish/subscribe消息总线,简化了应用程序内各组件间.组件与后台线程间的通信.比如请求网络,等网络返回时通过Hand ...