时间:2014-12-19 01:17来源:csdn 作者:大智 举报 点击:5639次

本想做些防火墙策略。防火墙策略都是写在/etc/sysconfig/iptables文件里面的。可我发现我也没有这个文件。

[root@iZ23gx7o02aZ /]# cd /etc/sysconfig/
[root@iZ23gx7o02aZ sysconfig]# ls
atd firstboot irqbalance network-scripts rhn sysstat
auditd grub kdump ntpd rngd sysstat.ioconf
authconfig htcacheclean kernel ntpdate rsyslog system-config-firewall
cbq httpd keyboard prelink sandbox system-config-firewall.old
clock i18n modules quota_nld saslauthd udev
console init netconsole raid-check selinux
cpuspeed ip6tables-config network readahead smartmontools
crond iptables-config networking readonly-root sshd
[root@iZ23gx7o02aZ sysconfig]#

解决办法:

1. 随便写一条iptables命令配置个防火墙规则。如:iptables -P OUTPUT ACCEPT。

[root@iZ23gx7o02aZ /]# cd /etc/sysconfig/
[root@iZ23gx7o02aZ sysconfig]# iptables -P OUTPUT ACCEPT

2. 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]#

3. 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]#

/etc/sysconfig/下找不到iptables文件解决方法的更多相关文章

  1. 关于allegro找不到env文件解决方法

    使用allegro的友人时对于env文件并不陌生.在我们设计的过程中经常使用env文件设置快捷键从而达到快速拉线的目的.但是新安装的allegro软件中会找不到env文件,因为今天自己碰到了这件事,并 ...

  2. centos7下找不到iptables文件

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

  3. shell下批量重命名svn文件的方法

    shell下批量重命名svn文件的方法 目标: 将svn目录下所有文件重命名 , 原文件前缀为 ucc_ , 批量改为 xmd_ 用tree看下当前svn目录 ucc_1.c ucc_1.h ucc_ ...

  4. virtualbox虚拟机下的cdlinux找不到无线网卡的解决方法

    virtualbox虚拟机下的cdlinux找不到无线网卡的解决方法 自己解决了,记录一下. cdlinux 带reaver1.4的版本 http://pan.baidu.com/share/link ...

  5. Django 1.10 找不到静态资源解决方法

    测试版本:Django 1.10 问题:Django项目找不到静态资源 解决方法: 1.首先你需要在自己的app下面创建2个目录 static 和  templates 树形结构如下(DjangoPr ...

  6. [转]win7下apache2.4响应很慢解决方法

    win7下apache2.4响应很慢解决方法 PS.按照以下方法测试了以下,似乎确实快了一点[skysowe] 转载自: http://blog.sina.com.cn/s/blog_75ad1010 ...

  7. Tomcat 在win7/win8 系统下tomcat-users.xml.new(拒绝访问)解决方法

    tomcat启动报错No UserDatabase component found under key UserDatabase 也可以这样处理 Tomcat 在win7/win8 系统下tomcat ...

  8. 【转载】WIN7访问共享:0x80070035 找不到网络路径解决方法

    转载:http://blog.chinaunix.net/uid-12372814-id-3518571.html 昨天刚装WIN7系统,今天早上准备访问服务器安装些软件,结果出现网络错误,提示Win ...

  9. windows下mysql中文乱码, 配置解决方法

    内容源自:windows下mysql中文乱码, 配置解决方法 解决方法:打开mysql安装目录,打开my.ini文件(如果只有my-default.ini文件,先将其改名为my.ini!!!) 修改内 ...

随机推荐

  1. 集合(set)-Python3

    set 的 remove() 和 discard()  方法介绍. 函数/方法名   等价操作符 说明 所有集合类型 len(s)   集合基数:集合s中元素个数 set([obj])   可变集合工 ...

  2. Jquery双向select控件Bootstrap Dual Listbox

    效果预览: 一. 下载插件 github地址:https://github.com/istvan-ujjmeszaros/bootstrap-duallistbox 也可以在这个网站中下载:http: ...

  3. Storm内部的消息传递机制

    作者:Jack47 转载请保留作者和原文出处 欢迎关注我的微信公众账号程序员杰克,两边的文章会同步,也可以添加我的RSS订阅源. 一个Storm拓扑,就是一个复杂的多阶段的流式计算.Storm中的组件 ...

  4. ABP(现代ASP.NET样板开发框架)系列之7、ABP Session管理

    点这里进入ABP系列文章总目录 基于DDD的现代ASP.NET开发框架--ABP系列之7.ABP Session管理 ABP是“ASP.NET Boilerplate Project (ASP.NET ...

  5. HTML (超文本标记语言)

    <html> --开始标签 <head> 网页上的控制信息 <title>页面标题</title> </head> <body> ...

  6. JSON.stringify()与JSON.parse()

    JSON.stringify()用于把一个对象解析成字符串,如 var student = { age: 23, name: 'wang' } JSON.stringify(student); 结果: ...

  7. 设计模式之迪米特原则(LOD)(最少知识原则)

    来源:迪米特法则(LoD)最初是用来作为面向对象的系统设计风格的一种法则,是很多著名系统,如火星登陆软件系统.木星的欧罗巴卫星轨道飞船的软件系统的指导设计原则. 迪米特法则(LoD)又可分为两种:狭义 ...

  8. AngularJS_01之基础概述、设计原则及MVC设计模式

    1.AngularJS: 开源的JS框架,用来开发单一页面应用,以及数据操作频繁的场景:2.设计原则: ①YAGNI原则:You Aren't Gonna Need It! 不要写不需要的代码! ②K ...

  9. Notes:SVG(4)基于stroke-dasharray和stroke-dashoffset圆形进度条

    stroke-dasharray:定义描边的虚线长度,如果提供奇数个,则会自动复制该值成偶数 stroke-dashoffset:定义虚线描边的偏移量(在路径开始的前面,看不到) 实现如下所示 svg ...

  10. 欢迎使用 MWeb

    首先介绍一下 MWeb 是什么,MWeb 是专业的 Markdown 写作.记笔记.静态博客生成软件.MWeb 使用的是 Github Flavored Markdown 语法,在使用 MWeb 前, ...