原因:在新安装的Linux系统中,防火墙默认是被禁掉的,一般也没有配置过任何防火墙的策略,所有不存在/etc/sysconfig/iptables文件。

解决办法:
、随便写一条iptables命令配置个防火墙规则:如: iptables -P OUTPUT ACCEPT ,进行保存 service iptables save ,service iptables restart 异常 The service command supports only basic LSB actions (start, stop, restart, try-restart, reload, force-reload, status). For other actions, please try to use systemctl. 解决 With RHEL / CentOS , 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: [html] view plain copy
systemctl stop firewalld
systemctl mask firewalld Then, install the iptables
-services package: [html] view plain copy
yum install iptables-
services Enable the service at boot-time: [html] view plain copy
systemctl enable iptables Managing the service [html] view plain copy
systemctl stop iptables systemctl start iptables systemctl |restart iptables Saving your firewall rules can be done as follows: [html] view plain copy
service iptables save or [html] view plain copy
/usr/libexec/iptables/iptables.init save 参考文章:
http://www.centoscn.com/CentosBug/osbug/2014/0919/3779.html http://www.cnblogs.com/love3556/p/5923392.html

在新安装的Linux系统中,防火墙默认是被禁掉的,一般也没有配置过任何防火墙的策略,所有不存在/etc/sysconfig/iptables文件。的更多相关文章

  1. Linux系统中python默认版本为python2.7,修改为python3 项目上传码云

    # 查询系统本系统中安装的python版本 ls -l /usr/bin/python* 1.在虚拟机上新建虚拟环境 # 系统中python默认版本为python2.,可以将其修改为python3 # ...

  2. 如何安装整个linux系统中所需要的mp3播放库插件? 可以在安装rpmfusion仓库后直接通过dnf install进行按照就可以了

    在vi的界面中, 前面的数字, 表示一行. 而对于中文而言, 并不一定是"一个文本行"就是一行, 而是以 回车(硬回车)为标志, 来判定一行的. 而dd, yy等也是以" ...

  3. 在 Linux 系统中安装Load Generator ,并在windows 调用方法

    在 Linux 系统中安装Load Generator ,并在windows 调用 由于公司需要测试系统的最大用户承受能力,所以需要学习使用loadrunner.在安装的时候碰到了不少问题,所以写下此 ...

  4. 在 Linux 系统中安装Load Generator ,并在windows 调用

    原文地址:http://www.blogjava.net/qileilove/archive/2012/03/14/371861.html 由于公司需要测试系统的最大用户承受能力,所以需要学习使用lo ...

  5. 『学了就忘』Linux服务管理 — 75、Linux系统中的服务

    目录 1.服务的介绍 2.Windows系统中的服务 3.Linux系统中服务的分类 4.独立的服务和基于xinetd服务的区别 5.如何查看一个服务是独立的服务还是基于xinetd的服务 (1)查看 ...

  6. Linux 系统中的MySQL数据库默认区分大小写

    今天在开发中遇到这么个问题,将连接的数据库改为服务器上的时候(服务器是Linux系统的),程序跑起来后一直出错,总提示数据库的表找不到, 而打开数据库看该表明明是存在的,在我的印象中MySQL数据是不 ...

  7. 在 Linux 系统中读取 GBK 编码的文档

    Linux 系统中,默认使用 UTF-8 编码.有时,我们下载的一些文件(比如 TXT 电子书,中文字幕等)使用了 GBK 编码,这样,当我们读取这些文件时,就会看到乱码.一般来说,有两种解决办法. ...

  8. 解决Linux系统没有/etc/sysconfig/iptables文件

    Linux系统中,防火墙默认是不开启的,一般也没有配置过任何防火墙的策略,所以不存在/etc/sysconfig/iptables文件. 一.常规解决方法: 1.在控制台使用iptables命令随便写 ...

  9. Linux系统中tomcat的安装及优化

    Linux系统中Tomcat 8 安装 Tomcat 8 安装 官网:http://tomcat.apache.org/ Tomcat 8 官网下载:http://tomcat.apache.org/ ...

随机推荐

  1. [UE4]end快捷键,落地

    actor的根节点需要是实体模型才可以,end快捷键着地是让actor的根节点着地.

  2. hadoop ha环境下的datanode启动报错java.lang.NumberFormatException: For input string: "10m"

    hadoop ha环境启动start-dfs.sh的时候datanode启动不了,并且报错. [hadoop@datanode2 ~]$ cat /home/hadoop/hadoop-2.7.3/l ...

  3. PLSQL导出对象的表结构和表数据

    https://jingyan.baidu.com/article/fcb5aff78e6a48edab4a7146.html

  4. pthread mutex

    pthead_mutex_t mutex; 1:create: pthread_mutex_init(pthread_mutex_t* mutex, const pthread_mutexattr_t ...

  5. tcp粘包解决

    import socket import hashlib import subprocess import struct phone = socket.socket(socket.AF_INET,so ...

  6. Android Activity传递数据使用getIntent()接收不到,揭秘Intent传递数据与Activity启动模式singleTask的关系。

    activity通过intent传递数据的时候,如果activity未启动,那么在这个刚启动的activity里通过getIntent()会获取到这个intent的数据.. 如果要启动的activit ...

  7. python学习之----BeautifulSoup的find()和findAll()及四大对象

    BeautifulSoup 里的find() 和findAll() 可能是你最常用的两个函数.借助它们,你可以通 过标签的不同属性轻松地过滤HTML 页面,查找需要的标签组或单个标签. 这两个函数非常 ...

  8. 介绍Collection框架的结构;Collection 和 Collections的区别

    介绍Collection框架的结构:Collection 和 Collections的区别 集合框架: Collection:List列表,Set集 Map:Hashtable,HashMap,Tre ...

  9. tkinter menu

    python] view plain copy '''''Tkinter教程之Menu篇''' '''''1.创建一个简单的Menu''' # 添加菜单hello和quit,将hello菜单与hell ...

  10. hive压缩

    1. 常用  rcfile + gzip parquet + snappy 2. 压缩比,参考 TextFile默认格式,加载速度最快,可以采用Gzip进行压缩,压缩后的文件无法split,即并行处理 ...