centos7下找不到iptables文件
最近在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文件的更多相关文章
- /etc/sysconfig/下找不到iptables文件解决方法
时间:2014-12-19 01:17来源:csdn 作者:大智 举报 点击:5639次 本想做些防火墙策略.防火墙策略都是写在/etc/sysconfig/iptables文件里面的.可我发现我也没 ...
- Intellij16创建Spring-Mybatis项目创(填)建(坑)记录,解决IDEA下找不到xml文件的问题
转入Intellij已经有1个月了,编程效率确实比Eclipse快了很多,而且可以直接使用Maven,然后就想写个小项目玩玩,架构搭建完后,想着万事俱备,又不是第一次玩框架,照葫芦画瓢撑死半天就能完成 ...
- Linux下找不到so文件的解决办法
http://www.cnblogs.com/xudong-bupt/p/3698294.html 如果使用自己手动生成的动态链接库.so文件,但是这个.so文件,没有加入库文件搜索路劲中,程序运行时 ...
- centos7下rsync+inotify脚本实现文件同步,.NET CORE客户端文件更新后自动重启服务
源服务器IP:192.168.8.51 目标服务器IP:192.168.8.79 安装前源服务器及目标服务器均需关闭FIREWALLD\SELINUX防火墙 sestatus | grep statu ...
- Centos7下关闭Firewalls配置iptables
在网上搜索了很多这种资料,现在总结一下以备后用. 1.关闭防火墙:sudo systemctl stop firewalld.service 2.关闭开机启动:sudo systemctl disab ...
- centos7下没有iptables
从centos7开始使用linux,之前版本的没有深入了解过,今天要开放个端口,需要有防火墙的相关操作,从网上查资料都是编辑/etc/sysconfig目录下面的iptables文件,可我进入这个文件 ...
- Linux系统下我的/etc/sysconfig/路径下无iptables文件
转载于:https://blog.csdn.net/zzm8421/article/details/78083582 虚拟机新装了一个CentOs7,然后做防火墙配置的时候找不到iptables文件, ...
- 防火墙问题 Linux系统 /etc/sysconfig/路径下无iptables文件
虚拟机新装了一个CentOs7,然后做防火墙配置的时候找不到iptables文件,解决方法如下: 因为默认使用的是firewall作为防火墙,把他停掉装个iptable systemctl stop ...
- Centos7下的基本操作
本系统是在centos7下最小化安装的 文件操作相关 创建文件夹mkdir name //创建一个文件夹 创建文本touch test.txt //创建文本 删除文件夹rm -rf 文件名 //删除文 ...
随机推荐
- arcgis for android 读取shp文件中文乱码解决方法
设置注册表默认字符,即可解决中文乱码问题. 'dbfDefault' 设置方法1.开始--运行,输入”Regedit“,打开注册表.2.如是用的是 10.x 版本 ArcGIS Desktop,定位到 ...
- Centos 7: 改变docker的image存放目录
1.创建新的数据目录 mkdir /data/docker 2.关闭docker进程 systemctl stop docker 3.修改配置文件/usr/lib/systemd/system/doc ...
- Windows使用Idea编译spark源码
1. 环境准备 JDK1.8 Scala2.11.8 Maven 3.3+ IDEA with scala plugin 2. 下载spark源码 下载地址 https://archive.apach ...
- delphi版本对应
delphi 7 delphi 8delphi 2005 ----- 9delphi 2006 ----- 10 delphi 2007 ----- 11delphi 2009 ----- 12 de ...
- es6(12)--类,对象
//类,对象 { //基本定义和生成实例 class Parent{ //定义构造函数 constructor(name='QQQ'){ this.name=name; } } let v_paren ...
- edis 以及 Python操作Redis
Redis 以及 Python操作Redis Redis Redis是完全开源免费的,遵守BSD协议,是一个高性能的key-value数据库. Redis有以下特点: -- Redis支持数据的持 ...
- 【Selenium-WebDriver自学】Selenium-IDE验证点(五)
==================================================================================================== ...
- VS2015和QTcreator冲突解决办法
当我安装了QT(联合VS的版本)和VS时候,刚开始几个月都是可以的,突然有一天不行了,一直显示出错(由于着急没有记录出错截图)!这个时候卸载QT和VS都没有用,两个软件连新建工程都不行了.试了网上说的 ...
- android开发 一个更优的listView的写法
布局xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:androi ...
- Java swing 代码例子
package com; import java.awt.Button; import java.awt.Container; import java.awt.event.ActionEvent; i ...