防火墙规则默认都是在/etc/sysconfig/iptables这个文件中的

出现这个问题,是因为在/etc/sysconfig/目录下没有找到iptables这个文件

可以使用service iptables save来创建一个

如果不行的话,就先增加一条规则

iptables -P OUTPUT ACCEPT   #网口出默认允许所有

或者

iptables -A INPUT -p tcp --dport 22 -j ACCEPT  #22端口允许所有

在执行service iptables save就可以保存了

iptables:no config file的更多相关文章

  1. MySQL无法启动问题解决Warning: World-writable config file ‘/etc/my.cnf’ is ignored

    今天重启一台内网服务器,发现mysql无法正常重启,执行systemctl start mysql,报错如下 Starting LSB: start and stop MySQL... Dec 11 ...

  2. [笔记]HAproxy reload config file with uninterrupt session

    HAProxy is a high performance load balancer. It is very light-weight, and free, making it a great op ...

  3. error in config file "/etc/rabbitmq/rabbitmq.config"

    记录一次RabbitMQ配置文件配置错误 error信息: dill@ubuntu-vm:/usr/share/doc/rabbitmq-server$ sudo /usr/lib/rabbitmq/ ...

  4. .NET错误The 'targetFramework' attribute in the <compilation> element of the Web.config file is used only to target version 4.0 and later of the .NET Framework

    错误描述: The 'targetFramework' attribute in the <compilation> element of the Web.config file is u ...

  5. No connection string named '***' could be found in the application config file

    Code-First时更新数据库遇到妖孽问题“No connection string named '***' could be found in the application config fil ...

  6. Camel routes in Spring config file

    The normal spring bean definition configuration file, the xsi:schemaLocation only has two: beans and ...

  7. 为 vsftpd 启动 vsftpd:500 OOPS: bad bool value in config file for: pasv_enable

    每行的值都不要有空格,否则启动时会出现错误,举个例子,假如我在listen=YES后多了个空格,那我启动时就出现.. 为 vsftpd 启动 vsftpd:500 OOPS: bad bool val ...

  8. Warning: World-writable config file '/etc/my.cnf' is ignored

    1. 问题描述: 重启mysql服务时出现以下信息: Warning: World-writable config file '/etc/my.cnf' is ignored 出现这种情况的原因是:m ...

  9. MySQL无法重启问题解决Warning: World-writable config file ‘/etc/my.cnf’ is ignored

    MySQL无法重启问题解决Warning: World-writable config file ‘/etc/my.cnf’ is ignored

随机推荐

  1. TensorFlow模型转为caffe模型

    最近由于要将训练好的模型移植到硬件上,因此需要将TensorFlow转为caffe模型. caffe模型需要两个文件,一个是定义网络结构的prototxt,一个是存储了参数的caffemodel文件. ...

  2. springboot+自定义注解实现灵活的切面配置

    利用aop我们可以实现业务代码与系统级服务例如日志记录.事务及安全相关业务的解耦,使我们的业务代码更加干净整洁. 最近在做数据权限方面的东西,考虑使用切面对用户访问进行拦截,进而确认用户是否对当前数据 ...

  3. orcale 之函数

    我们知道存储过程的调用是一条 PL/SQL 语句.那么对于一些表达式我们用什么呢?这里函数的功能就会体现出来了. 函数和过程在创建方式上有很多的类似地方,也是编译后放入内存中以供用户使用,只不过函数调 ...

  4. 解决ajax请求返回Json无法解析"\"字符的问题

    原因:获取身份证信息,涉及图片路径,存在“\”字符,导致Json解析错误 解决思路:将返回类型从"json"改成"text",此时返回的数据类型变成字符串,将字 ...

  5. leetcode_173【二叉搜索树迭代器】

    实现一个二叉搜索树迭代器.你将使用二叉搜索树的根节点初始化迭代器. 调用 next() 将返回二叉搜索树中的下一个最小的数. 示例: BSTIterator iterator = new BSTIte ...

  6. Go语言备忘录(3):net/http包的使用模式和源码解析

    本文是晚辈对net/http包的一点浅显的理解,文中如有错误的地方请前辈们指出,以免误导! 转摘本文也请注明出处:Go语言备忘录(3):net/http包的使用模式和源码解析,多谢!  目录: 一.h ...

  7. docker创建nginx镜像

    注意:此处不是用的dockerfile创建的镜像,只是用来搞一搞 首先你的系统里面要安装docker,这里就不重复介绍了,可以看之前的文章: 然后再搞一个基础镜像 docker pull regist ...

  8. .net iis excel导出问题

    碰到几个问题的解决方法 1.当我远程服务器时才可以导出excel!!关闭了远程就不行... 解决:运行mmc -32组件服务 ->DCOM Config->Microsoft Excel  ...

  9. IntelliJ IDEA+Mysql connecter/j JDBC驱动连接

    在IntelliJ IDEA中用connecter/j jdbc驱动连接MYSQL 以下是解决过程,待整合...有点懒,有空再改 官方文档:https://www.cnblogs.com/cn-chy ...

  10. 最近使用日期控件时,用到了My97DatePicker控件,单日期控件,记录一下

    以上是使用时的效果,可以自己设定日期有效区间,如下图: 对于起始日期和终止日期的控制如下: <td> <label >起始日期:</label> <input ...